forked from OSchip/llvm-project
[DSE] Regenerate test checks (NFC)
This commit is contained in:
parent
55861c9681
commit
f8042492fe
|
@ -1,3 +1,4 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; Test to make sure llvm.invariant.start calls are not treated as clobbers.
|
||||
; RUN: opt < %s -basic-aa -dse -S | FileCheck %s
|
||||
|
||||
|
@ -6,29 +7,31 @@ declare {}* @llvm.invariant.start.p0i8(i64, i8* nocapture) nounwind readonly
|
|||
; We cannot remove the store 1 to %p.
|
||||
; FIXME: By the semantics of invariant.start, the store 3 to p is unreachable.
|
||||
define void @test(i8 *%p) {
|
||||
; CHECK-LABEL: @test(
|
||||
; CHECK-NEXT: store i8 1, i8* [[P:%.*]], align 4
|
||||
; CHECK-NEXT: [[I:%.*]] = call {}* @llvm.invariant.start.p0i8(i64 1, i8* [[P]])
|
||||
; CHECK-NEXT: store i8 3, i8* [[P]], align 4
|
||||
; CHECK-NEXT: ret void
|
||||
;
|
||||
store i8 1, i8* %p, align 4
|
||||
%i = call {}* @llvm.invariant.start.p0i8(i64 1, i8* %p)
|
||||
store i8 3, i8* %p, align 4
|
||||
ret void
|
||||
; CHECK-LABEL: @test(
|
||||
; CHECK-NEXT: store i8 1, i8* %p, align 4
|
||||
; CHECK-NEXT: %i = call {}* @llvm.invariant.start.p0i8(i64 1, i8* %p)
|
||||
; CHECK-NEXT: store i8 3, i8* %p, align 4
|
||||
; CHECK-NEXT: ret void
|
||||
}
|
||||
|
||||
; FIXME: We should be able to remove the first store to p, even though p and q
|
||||
; may alias.
|
||||
define void @test2(i8* %p, i8* %q) {
|
||||
; CHECK-LABEL: @test2(
|
||||
; CHECK-NEXT: store i8 1, i8* [[P:%.*]], align 4
|
||||
; CHECK-NEXT: store i8 2, i8* [[Q:%.*]], align 4
|
||||
; CHECK-NEXT: [[I:%.*]] = call {}* @llvm.invariant.start.p0i8(i64 1, i8* [[Q]])
|
||||
; CHECK-NEXT: store i8 3, i8* [[P]], align 4
|
||||
; CHECK-NEXT: ret void
|
||||
;
|
||||
store i8 1, i8* %p, align 4
|
||||
store i8 2, i8* %q, align 4
|
||||
%i = call {}* @llvm.invariant.start.p0i8(i64 1, i8* %q)
|
||||
store i8 3, i8* %p, align 4
|
||||
ret void
|
||||
; CHECK-LABEL: @test2(
|
||||
; CHECK-NEXT: store i8 1, i8* %p, align 4
|
||||
; CHECK-NEXT: store i8 2, i8* %q, align 4
|
||||
; CHECK-NEXT: %i = call {}* @llvm.invariant.start.p0i8(i64 1, i8* %q)
|
||||
; CHECK-NEXT: store i8 3, i8* %p, align 4
|
||||
; CHECK-NEXT: ret void
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue