summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Thumb2
diff options
context:
space:
mode:
authorEli Friedman <efriedma@codeaurora.org>2018-07-10 23:44:37 +0000
committerEli Friedman <efriedma@codeaurora.org>2018-07-10 23:44:37 +0000
commitd2c739230ced8e1557c67bc661e91cf807be0a32 (patch)
tree01cf6ab0825bcd6458e8f4cde0a305a4f7da5744 /llvm/test/CodeGen/Thumb2
parenta3c473e650f538a93b66187ac02980dd6ab1ab45 (diff)
downloadbcm5719-llvm-d2c739230ced8e1557c67bc661e91cf807be0a32.tar.gz
bcm5719-llvm-d2c739230ced8e1557c67bc661e91cf807be0a32.zip
[ARM] Treat cmn immediates as legal in isLegalICmpImmediate.
The original code attempted to do this, but the std::abs() call didn't actually do anything due to implicit type conversions. Fix the type conversions, and perform the correct check for negative immediates. This probably has very little practical impact, but it's worth fixing just to avoid confusion in the future, I think. Differential Revision: https://reviews.llvm.org/D48907 llvm-svn: 336742
Diffstat (limited to 'llvm/test/CodeGen/Thumb2')
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-cmp.ll5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-cmp.ll b/llvm/test/CodeGen/Thumb2/thumb2-cmp.ll
index 57ea5571311..7d92c4d0ee4 100644
--- a/llvm/test/CodeGen/Thumb2/thumb2-cmp.ll
+++ b/llvm/test/CodeGen/Thumb2/thumb2-cmp.ll
@@ -169,7 +169,7 @@ false:
define i32 @slt_neg_soimm(i32 %a) {
; CHECK-LABEL: slt_neg_soimm:
-; CHECK: mvn r1, #7929856
+; CHECK: cmn.w r0, #7929856
%b = icmp slt i32 %a, -7929856
br i1 %b, label %true, label %false
@@ -208,8 +208,7 @@ false:
define i32 @sgt_neg_soimm(i32 %a) {
; CHECK-LABEL: sgt_neg_soimm:
-; CHECK: movs r1, #1
-; CHECK: movt r1, #65415
+; CHECK: cmn.w r0, #7929856
%b = icmp sgt i32 %a, -7929856
br i1 %b, label %true, label %false
OpenPOWER on IntegriCloud