summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-12-09 04:02:15 +0000
committerVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-12-09 04:02:15 +0000
commitf6c8fe983b188dde5d4aaa14984c6c7e1208219b (patch)
tree246ed1a92ca7c6146f089c04a2259cf7b289678f /llvm/test/CodeGen
parent844a7da2431fb4d2d5e8b2485c6fe05c7190600a (diff)
downloadbcm5719-llvm-f6c8fe983b188dde5d4aaa14984c6c7e1208219b.tar.gz
bcm5719-llvm-f6c8fe983b188dde5d4aaa14984c6c7e1208219b.zip
[Sparc]: Implement getSetCCResultType() in SparcTargetLowering so that umulo/smulo can be lowered on sparcv9 without an assertion error.
llvm-svn: 196751
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/SPARC/64cond.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SPARC/64cond.ll b/llvm/test/CodeGen/SPARC/64cond.ll
index bdc5e70a2de..7451b04eadf 100644
--- a/llvm/test/CodeGen/SPARC/64cond.ll
+++ b/llvm/test/CodeGen/SPARC/64cond.ll
@@ -109,3 +109,17 @@ entry:
%rv = select i1 %tobool, i64 123, i64 0
ret i64 %rv
}
+
+; CHECK-LABEL: setcc_resultty
+; CHECK: cmp
+; CHECK: movne %xcc, 1, [[R:%[gilo][0-7]]]
+; CHECK: or [[R]], %i1, %i0
+
+define i1 @setcc_resultty(i64 %a, i1 %b) {
+ %a0 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 32)
+ %a1 = extractvalue { i64, i1 } %a0, 1
+ %a4 = or i1 %a1, %b
+ ret i1 %a4
+}
+
+declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64)
OpenPOWER on IntegriCloud