summaryrefslogtreecommitdiff
path: root/test/CodeGen/AArch64
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-05-30 08:59:55 +0000
committerTim Northover <tnorthover@apple.com>2014-05-30 08:59:55 +0000
commit7be505ae8877d99d761da08952afbe74bacdae9e (patch)
treebfc132e7335f04dc92daba230360b54c4d09e4d1 /test/CodeGen/AArch64
parentfd481d05beaec08e25e07e3d0d19cf26948074aa (diff)
downloadllvm-7be505ae8877d99d761da08952afbe74bacdae9e.tar.gz
llvm-7be505ae8877d99d761da08952afbe74bacdae9e.tar.bz2
llvm-7be505ae8877d99d761da08952afbe74bacdae9e.tar.xz
AArch64 & ARM: remove undefined behaviour from some tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209880 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/AArch64')
-rw-r--r--test/CodeGen/AArch64/arm64-2012-05-09-LOADgot-bug.ll6
-rw-r--r--test/CodeGen/AArch64/arm64-ands-bad-peephole.ll8
-rw-r--r--test/CodeGen/AArch64/arm64-convert-v2f64-v2i32.ll12
-rw-r--r--test/CodeGen/AArch64/arm64-convert-v2i32-v2f64.ll8
-rw-r--r--test/CodeGen/AArch64/arm64-dagcombiner-indexed-load.ll16
-rw-r--r--test/CodeGen/AArch64/arm64-vcvt.ll12
6 files changed, 31 insertions, 31 deletions
diff --git a/test/CodeGen/AArch64/arm64-2012-05-09-LOADgot-bug.ll b/test/CodeGen/AArch64/arm64-2012-05-09-LOADgot-bug.ll
index d1840d3594..7da2d2ca51 100644
--- a/test/CodeGen/AArch64/arm64-2012-05-09-LOADgot-bug.ll
+++ b/test/CodeGen/AArch64/arm64-2012-05-09-LOADgot-bug.ll
@@ -2,14 +2,14 @@
; RUN: llc -mtriple=arm64-linux-gnu -relocation-model=pic < %s | FileCheck %s --check-prefix=CHECK-LINUX
; <rdar://problem/11392109>
-define hidden void @t() optsize ssp {
+define hidden void @t(i64* %addr) optsize ssp {
entry:
- store i64 zext (i32 ptrtoint (i64 (i32)* @x to i32) to i64), i64* undef, align 8
+ store i64 zext (i32 ptrtoint (i64 (i32)* @x to i32) to i64), i64* %addr, align 8
; CHECK: adrp x{{[0-9]+}}, _x@GOTPAGE
; CHECK: ldr x{{[0-9]+}}, [x{{[0-9]+}}, _x@GOTPAGEOFF]
; CHECK-NEXT: and x{{[0-9]+}}, x{{[0-9]+}}, #0xffffffff
; CHECK-NEXT: str x{{[0-9]+}}, [x{{[0-9]+}}]
- unreachable
+ ret void
}
declare i64 @x(i32) optsize
diff --git a/test/CodeGen/AArch64/arm64-ands-bad-peephole.ll b/test/CodeGen/AArch64/arm64-ands-bad-peephole.ll
index 34d6287b8b..cf6235570a 100644
--- a/test/CodeGen/AArch64/arm64-ands-bad-peephole.ll
+++ b/test/CodeGen/AArch64/arm64-ands-bad-peephole.ll
@@ -8,18 +8,18 @@ target triple = "arm64-apple-ios"
; CHECK-LABEL: tst1:
; CHECK: add [[REG:w[0-9]+]], w{{[0-9]+}}, #1
; CHECK: tst [[REG]], #0x1
-define void @tst1() {
+define void @tst1(i1 %tst, i32 %true) {
entry:
- br i1 undef, label %for.end, label %for.body
+ br i1 %tst, label %for.end, label %for.body
for.body: ; preds = %for.body, %entry
%result.09 = phi i32 [ %add2.result.0, %for.body ], [ 1, %entry ]
%i.08 = phi i32 [ %inc, %for.body ], [ 2, %entry ]
%and = and i32 %i.08, 1
%cmp1 = icmp eq i32 %and, 0
- %add2.result.0 = select i1 %cmp1, i32 undef, i32 %result.09
+ %add2.result.0 = select i1 %cmp1, i32 %true, i32 %result.09
%inc = add nsw i32 %i.08, 1
- %cmp = icmp slt i32 %i.08, undef
+ %cmp = icmp slt i32 %i.08, %true
br i1 %cmp, label %for.body, label %for.cond.for.end_crit_edge
for.cond.for.end_crit_edge: ; preds = %for.body
diff --git a/test/CodeGen/AArch64/arm64-convert-v2f64-v2i32.ll b/test/CodeGen/AArch64/arm64-convert-v2f64-v2i32.ll
index d862b1e194..1ea47ade81 100644
--- a/test/CodeGen/AArch64/arm64-convert-v2f64-v2i32.ll
+++ b/test/CodeGen/AArch64/arm64-convert-v2f64-v2i32.ll
@@ -4,10 +4,10 @@
; CHECK: fcvtzs.2d
; CHECK: xtn.2s
; CHECK: ret
-define void @fptosi_1() nounwind noinline ssp {
+define void @fptosi_1(<2 x double> %in, <2 x i32>* %addr) nounwind noinline ssp {
entry:
- %0 = fptosi <2 x double> undef to <2 x i32>
- store <2 x i32> %0, <2 x i32>* undef, align 8
+ %0 = fptosi <2 x double> %in to <2 x i32>
+ store <2 x i32> %0, <2 x i32>* %addr, align 8
ret void
}
@@ -15,10 +15,10 @@ entry:
; CHECK: fcvtzu.2d
; CHECK: xtn.2s
; CHECK: ret
-define void @fptoui_1() nounwind noinline ssp {
+define void @fptoui_1(<2 x double> %in, <2 x i32>* %addr) nounwind noinline ssp {
entry:
- %0 = fptoui <2 x double> undef to <2 x i32>
- store <2 x i32> %0, <2 x i32>* undef, align 8
+ %0 = fptoui <2 x double> %in to <2 x i32>
+ store <2 x i32> %0, <2 x i32>* %addr, align 8
ret void
}
diff --git a/test/CodeGen/AArch64/arm64-convert-v2i32-v2f64.ll b/test/CodeGen/AArch64/arm64-convert-v2i32-v2f64.ll
index daaf1e0f87..4eb0ca7185 100644
--- a/test/CodeGen/AArch64/arm64-convert-v2i32-v2f64.ll
+++ b/test/CodeGen/AArch64/arm64-convert-v2i32-v2f64.ll
@@ -20,10 +20,10 @@ define <2 x double> @f2(<2 x i32> %v) nounwind readnone {
; CHECK: autogen_SD19655
; CHECK: scvtf
; CHECK: ret
-define void @autogen_SD19655() {
- %T = load <2 x i64>* undef
- %F = sitofp <2 x i64> undef to <2 x float>
- store <2 x float> %F, <2 x float>* undef
+define void @autogen_SD19655(<2 x i64>* %addr, <2 x float>* %addrfloat) {
+ %T = load <2 x i64>* %addr
+ %F = sitofp <2 x i64> %T to <2 x float>
+ store <2 x float> %F, <2 x float>* %addrfloat
ret void
}
diff --git a/test/CodeGen/AArch64/arm64-dagcombiner-indexed-load.ll b/test/CodeGen/AArch64/arm64-dagcombiner-indexed-load.ll
index 2e4b658f1c..ce132c6afa 100644
--- a/test/CodeGen/AArch64/arm64-dagcombiner-indexed-load.ll
+++ b/test/CodeGen/AArch64/arm64-dagcombiner-indexed-load.ll
@@ -13,12 +13,12 @@ target triple = "arm64-apple-ios"
; CHECK-LABEL: XX:
; CHECK: ldr
-define void @XX(%class.A* %K) {
+define i32 @XX(%class.A* %K, i1 %tst, i32* %addr, %class.C** %ppC, %class.C* %pC) {
entry:
- br i1 undef, label %if.then, label %lor.rhs.i
+ br i1 %tst, label %if.then, label %lor.rhs.i
lor.rhs.i: ; preds = %entry
- %tmp = load i32* undef, align 4
+ %tmp = load i32* %addr, align 4
%y.i.i.i = getelementptr inbounds %class.A* %K, i64 0, i32 1
%tmp1 = load i64* %y.i.i.i, align 8
%U.sroa.3.8.extract.trunc.i = trunc i64 %tmp1 to i32
@@ -30,17 +30,17 @@ lor.rhs.i: ; preds = %entry
%add16.i = add nsw i32 %add12.i, %div15.i
%rem.i.i = srem i32 %add16.i, %tmp
%idxprom = sext i32 %rem.i.i to i64
- %arrayidx = getelementptr inbounds %class.C** undef, i64 %idxprom
- %tobool533 = icmp eq %class.C* undef, null
+ %arrayidx = getelementptr inbounds %class.C** %ppC, i64 %idxprom
+ %tobool533 = icmp eq %class.C* %pC, null
br i1 %tobool533, label %while.end, label %while.body
if.then: ; preds = %entry
- unreachable
+ ret i32 42
while.body: ; preds = %lor.rhs.i
- unreachable
+ ret i32 5
while.end: ; preds = %lor.rhs.i
%tmp3 = load %class.C** %arrayidx, align 8
- unreachable
+ ret i32 50
}
diff --git a/test/CodeGen/AArch64/arm64-vcvt.ll b/test/CodeGen/AArch64/arm64-vcvt.ll
index 8c9e4e9271..6570f0e3e7 100644
--- a/test/CodeGen/AArch64/arm64-vcvt.ll
+++ b/test/CodeGen/AArch64/arm64-vcvt.ll
@@ -665,19 +665,19 @@ define <2 x double> @ucvtf_2dc(<2 x i64> %A) nounwind {
;CHECK-LABEL: autogen_SD28458:
;CHECK: fcvt
;CHECK: ret
-define void @autogen_SD28458() {
- %Tr53 = fptrunc <8 x double> undef to <8 x float>
- store <8 x float> %Tr53, <8 x float>* undef
+define void @autogen_SD28458(<8 x double> %val.f64, <8 x float>* %addr.f32) {
+ %Tr53 = fptrunc <8 x double> %val.f64 to <8 x float>
+ store <8 x float> %Tr53, <8 x float>* %addr.f32
ret void
}
;CHECK-LABEL: autogen_SD19225:
;CHECK: fcvt
;CHECK: ret
-define void @autogen_SD19225() {
- %A = load <8 x float>* undef
+define void @autogen_SD19225(<8 x double>* %addr.f64, <8 x float>* %addr.f32) {
+ %A = load <8 x float>* %addr.f32
%Tr53 = fpext <8 x float> %A to <8 x double>
- store <8 x double> %Tr53, <8 x double>* undef
+ store <8 x double> %Tr53, <8 x double>* %addr.f64
ret void
}