summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/icmp.ll
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-10-25 20:11:47 +0000
committerSanjay Patel <spatel@rotateright.com>2016-10-25 20:11:47 +0000
commitf3dda13bd2fd08252ff5aaf84974a28d7c721f57 (patch)
tree51f884312fdd1ed50354eea29fb08560436805b8 /llvm/test/Transforms/InstCombine/icmp.ll
parentf6c4ab901b18b42cf26ad4984466ff9f51c48b42 (diff)
downloadbcm5719-llvm-f3dda13bd2fd08252ff5aaf84974a28d7c721f57.tar.gz
bcm5719-llvm-f3dda13bd2fd08252ff5aaf84974a28d7c721f57.zip
[InstCombine] Ensure that truncated int types are legal.
Fixes the FIXMEs in D25952 and rL285075. Patch by bryant! Differential Revision: https://reviews.llvm.org/D25955 llvm-svn: 285108
Diffstat (limited to 'llvm/test/Transforms/InstCombine/icmp.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/icmp.ll6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/test/Transforms/InstCombine/icmp.ll b/llvm/test/Transforms/InstCombine/icmp.ll
index 57e02a47e55..099aaca5f7d 100644
--- a/llvm/test/Transforms/InstCombine/icmp.ll
+++ b/llvm/test/Transforms/InstCombine/icmp.ll
@@ -1208,12 +1208,12 @@ define i1 @icmp_shl16(i32 %x) {
ret i1 %cmp
}
-; FIXME: We shouldn't be creating illegal types like i15 in InstCombine.
+; D25952: Don't create illegal types like i15 in InstCombine
define i1 @icmp_shl17(i32 %x) {
; CHECK-LABEL: @icmp_shl17(
-; CHECK-NEXT: [[TMP1:%.*]] = trunc i32 %x to i15
-; CHECK-NEXT: [[CMP:%.*]] = icmp slt i15 [[TMP1]], 18
+; CHECK-NEXT: [[SHL:%.*]] = shl i32 %x, 17
+; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[SHL]], 2359296
; CHECK-NEXT: ret i1 [[CMP]]
;
%shl = shl i32 %x, 17
OpenPOWER on IntegriCloud