summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Hexagon/cmp-extend.ll
diff options
context:
space:
mode:
authorColin LeMahieu <colinl@codeaurora.org>2015-06-17 17:19:05 +0000
committerColin LeMahieu <colinl@codeaurora.org>2015-06-17 17:19:05 +0000
commitca8a82d5c70fb19df909dc6b95ecca2179526308 (patch)
tree6dbb5502bf029f752256355973ad787ee0d8630f /llvm/test/CodeGen/Hexagon/cmp-extend.ll
parentdcaa53791c3e0aaa059018b855a3eb22e9f3a87f (diff)
downloadbcm5719-llvm-ca8a82d5c70fb19df909dc6b95ecca2179526308.tar.gz
bcm5719-llvm-ca8a82d5c70fb19df909dc6b95ecca2179526308.zip
[Hexagon] Adding some compare tests, fixing existing XFAILed tests, and removing mcpu=hexagonv4 since that's the minimum version anyway.
llvm-svn: 239917
Diffstat (limited to 'llvm/test/CodeGen/Hexagon/cmp-extend.ll')
-rw-r--r--llvm/test/CodeGen/Hexagon/cmp-extend.ll40
1 files changed, 40 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Hexagon/cmp-extend.ll b/llvm/test/CodeGen/Hexagon/cmp-extend.ll
new file mode 100644
index 00000000000..0bd1fca7394
--- /dev/null
+++ b/llvm/test/CodeGen/Hexagon/cmp-extend.ll
@@ -0,0 +1,40 @@
+; RUN: llc -march=hexagon -mcpu=hexagonv5 < %s | FileCheck %s
+
+%struct.RESULTS_S.A = type { i16, i16, i16, [4 x i8*], i32, i32, i32, %struct.list_head_s.B*, %struct.MAT_PARAMS_S.D, i16, i16, i16, i16, i16, %struct.CORE_PORTABLE_S.E }
+%struct.list_head_s.B = type { %struct.list_head_s.B*, %struct.list_data_s.C* }
+%struct.list_data_s.C = type { i16, i16 }
+%struct.MAT_PARAMS_S.D = type { i32, i16*, i16*, i32* }
+%struct.CORE_PORTABLE_S.E = type { i8 }
+
+; Test that we don't generate a zero extend in this case. Instead we generate
+; a single sign extend instead of two zero extends.
+
+; CHECK-NOT: zxth
+
+; Function Attrs: nounwind
+define void @core_bench_list(%struct.RESULTS_S.A* %res) #0 {
+entry:
+ %seed3 = getelementptr inbounds %struct.RESULTS_S.A, %struct.RESULTS_S.A* %res, i32 0, i32 2
+ %0 = load i16, i16* %seed3, align 2
+ %cmp364 = icmp sgt i16 %0, 0
+ br i1 %cmp364, label %for.body, label %while.body19.i160
+
+for.body:
+ %i.0370 = phi i16 [ %inc50, %if.then ], [ 0, %entry ]
+ br i1 undef, label %if.then, label %while.body.i273
+
+while.body.i273:
+ %tobool.i272 = icmp eq %struct.list_head_s.B* undef, null
+ br i1 %tobool.i272, label %if.then, label %while.body.i273
+
+if.then:
+ %inc50 = add i16 %i.0370, 1
+ %exitcond = icmp eq i16 %inc50, %0
+ br i1 %exitcond, label %while.body19.i160, label %for.body
+
+while.body19.i160:
+ br label %while.body19.i160
+}
+
+attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
+
OpenPOWER on IntegriCloud