forked from OSchip/llvm-project
[Test] Autogenerate existing tests before adding more
llvm-svn: 354398
This commit is contained in:
parent
2e1504091e
commit
979587d91d
|
@ -1,3 +1,4 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt -gvn -S < %s | FileCheck %s
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:4"
|
||||
|
@ -5,35 +6,52 @@ target triple = "x86_64-unknown-linux-gnu"
|
|||
|
||||
define void @f0(i1 %alwaysFalse, i64 %val, i64* %loc) {
|
||||
; CHECK-LABEL: @f0(
|
||||
; CHECK-NOT: inttoptr
|
||||
; CHECK-NOT: ptrtoint
|
||||
entry:
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: store i64 [[VAL:%.*]], i64* [[LOC:%.*]]
|
||||
; CHECK-NEXT: br i1 [[ALWAYSFALSE:%.*]], label [[NEVERTAKEN:%.*]], label [[ALWAYSTAKEN:%.*]]
|
||||
; CHECK: neverTaken:
|
||||
; CHECK-NEXT: [[LOC_BC:%.*]] = bitcast i64* [[LOC]] to i8 addrspace(4)**
|
||||
; CHECK-NEXT: [[PTR:%.*]] = load i8 addrspace(4)*, i8 addrspace(4)** [[LOC_BC]]
|
||||
; CHECK-NEXT: store i8 5, i8 addrspace(4)* [[PTR]]
|
||||
; CHECK-NEXT: ret void
|
||||
; CHECK: alwaysTaken:
|
||||
; CHECK-NEXT: ret void
|
||||
;
|
||||
entry:
|
||||
store i64 %val, i64* %loc
|
||||
br i1 %alwaysFalse, label %neverTaken, label %alwaysTaken
|
||||
|
||||
neverTaken:
|
||||
neverTaken:
|
||||
%loc.bc = bitcast i64* %loc to i8 addrspace(4)**
|
||||
%ptr = load i8 addrspace(4)*, i8 addrspace(4)** %loc.bc
|
||||
store i8 5, i8 addrspace(4)* %ptr
|
||||
ret void
|
||||
|
||||
alwaysTaken:
|
||||
alwaysTaken:
|
||||
ret void
|
||||
}
|
||||
|
||||
define i64 @f1(i1 %alwaysFalse, i8 addrspace(4)* %val, i8 addrspace(4)** %loc) {
|
||||
; CHECK-LABEL: @f1(
|
||||
; CHECK-NOT: inttoptr
|
||||
; CHECK-NOT: ptrtoint
|
||||
entry:
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: store i8 addrspace(4)* [[VAL:%.*]], i8 addrspace(4)** [[LOC:%.*]]
|
||||
; CHECK-NEXT: br i1 [[ALWAYSFALSE:%.*]], label [[NEVERTAKEN:%.*]], label [[ALWAYSTAKEN:%.*]]
|
||||
; CHECK: neverTaken:
|
||||
; CHECK-NEXT: [[LOC_BC:%.*]] = bitcast i8 addrspace(4)** [[LOC]] to i64*
|
||||
; CHECK-NEXT: [[INT:%.*]] = load i64, i64* [[LOC_BC]]
|
||||
; CHECK-NEXT: ret i64 [[INT]]
|
||||
; CHECK: alwaysTaken:
|
||||
; CHECK-NEXT: ret i64 42
|
||||
;
|
||||
entry:
|
||||
store i8 addrspace(4)* %val, i8 addrspace(4)** %loc
|
||||
br i1 %alwaysFalse, label %neverTaken, label %alwaysTaken
|
||||
|
||||
neverTaken:
|
||||
neverTaken:
|
||||
%loc.bc = bitcast i8 addrspace(4)** %loc to i64*
|
||||
%int = load i64, i64* %loc.bc
|
||||
ret i64 %int
|
||||
|
||||
alwaysTaken:
|
||||
alwaysTaken:
|
||||
ret i64 42
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue