block-address.ll 556 B

1234567891011121314151617181920212223
  1. ; RUN: opt -strip -S < %s | FileCheck %s
  2. ; PR10286
  3. @main_addrs = constant [2 x i8*] [i8* blockaddress(@f, %FOO), i8* blockaddress(@f, %BAR)]
  4. ; CHECK: @main_addrs = constant [2 x i8*] [i8* blockaddress(@f, %2), i8* blockaddress(@f, %3)]
  5. declare void @foo() nounwind
  6. declare void @bar() nounwind
  7. define void @f(i8* %indirect.goto.dest) nounwind uwtable ssp {
  8. entry:
  9. indirectbr i8* %indirect.goto.dest, [label %FOO, label %BAR]
  10. ; CHECK: indirectbr i8* %0, [label %2, label %3]
  11. FOO:
  12. call void @foo()
  13. ret void
  14. BAR:
  15. call void @bar()
  16. ret void
  17. }