Skip to content

Commit

Permalink
[SCCP] update test to NPM, update_test_checks. NFC
Browse files Browse the repository at this point in the history
Pre-committing a test update to make changes in D121744 more visible.
  • Loading branch information
nickdesaulniers committed Mar 16, 2022
1 parent b85922c commit 6ede09b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion llvm/test/Transforms/SCCP/dangling-block-address.ll
@@ -1,4 +1,5 @@
; RUN: opt < %s -internalize -ipsccp -S | FileCheck %s
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -passes=internalize,ipsccp %s | FileCheck %s
; PR5569

; IPSCCP should prove that the blocks are dead and delete them, and
Expand All @@ -10,13 +11,21 @@
@bar.l = internal constant [2 x i8*] [i8* blockaddress(@bar, %lab0), i8* blockaddress(@bar, %end)] ; <[2 x i8*]*> [#uses=1]

define void @foo(i32 %x) nounwind readnone {
; CHECK-LABEL: @foo(
; CHECK-NEXT: entry:
; CHECK-NEXT: unreachable
;
entry:
%b = alloca i32, align 4 ; <i32*> [#uses=1]
store volatile i32 -1, i32* %b
ret void
}

define void @bar(i32* nocapture %pc) nounwind readonly {
; CHECK-LABEL: @bar(
; CHECK-NEXT: entry:
; CHECK-NEXT: unreachable
;
entry:
br label %indirectgoto

Expand All @@ -37,6 +46,10 @@ indirectgoto: ; preds = %lab0, %entry
}

define i32 @main() nounwind readnone {
; CHECK-LABEL: @main(
; CHECK-NEXT: entry:
; CHECK-NEXT: unreachable
;
entry:
ret i32 0
}

0 comments on commit 6ede09b

Please sign in to comment.