compiler-used.ll 587 B

12345678910111213141516
  1. ; RUN: opt < %s -globalopt -S | FileCheck %s
  2. ; Test that when all members of llvm.compiler.used are found to be redundant
  3. ; we delete it instead of crashing.
  4. define void @foo() {
  5. ret void
  6. }
  7. @llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
  8. @llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
  9. ; CHECK-NOT: @llvm.compiler.used
  10. ; CHECK: @llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
  11. ; CHECK-NOT: @llvm.compiler.used