[llvm] r336289 - [InstCombine] add value names to test; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 4 09:56:35 PDT 2018
Author: spatel
Date: Wed Jul 4 09:56:35 2018
New Revision: 336289
URL: http://llvm.org/viewvc/llvm-project?rev=336289&view=rev
Log:
[InstCombine] add value names to test; NFC
That makes it easier to mix and match lines into other tests.
Modified:
llvm/trunk/test/Transforms/InstCombine/max_known_bits.ll
Modified: llvm/trunk/test/Transforms/InstCombine/max_known_bits.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/max_known_bits.ll?rev=336289&r1=336288&r2=336289&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/max_known_bits.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/max_known_bits.ll Wed Jul 4 09:56:35 2018
@@ -1,24 +1,24 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -instcombine < %s | FileCheck %s
+
; TODO: The entire thing should be folded to and i16 %0, 255.
-define i16 @foo(i16 ) {
+define i16 @foo(i16 %x) {
; CHECK-LABEL: @foo(
-; CHECK-NEXT: entry:
-; CHECK-NEXT: [[TMP1:%.*]] = and i16 [[TMP0:%.*]], 255
-; CHECK-NEXT: [[TMP2:%.*]] = zext i16 [[TMP1]] to i32
-; CHECK-NEXT: [[TMP3:%.*]] = icmp ult i32 [[TMP2]], 255
-; CHECK-NEXT: [[TMP4:%.*]] = select i1 [[TMP3]], i32 [[TMP2]], i32 255
-; CHECK-NEXT: [[TMP5:%.*]] = trunc i32 [[TMP4]] to i16
-; CHECK-NEXT: [[TMP6:%.*]] = and i16 [[TMP5]], 255
-; CHECK-NEXT: ret i16 [[TMP6]]
+; CHECK-NEXT: [[T1:%.*]] = and i16 [[X:%.*]], 255
+; CHECK-NEXT: [[T2:%.*]] = zext i16 [[T1]] to i32
+; CHECK-NEXT: [[T3:%.*]] = icmp ult i32 [[T2]], 255
+; CHECK-NEXT: [[T4:%.*]] = select i1 [[T3]], i32 [[T2]], i32 255
+; CHECK-NEXT: [[T5:%.*]] = trunc i32 [[T4]] to i16
+; CHECK-NEXT: [[T6:%.*]] = and i16 [[T5]], 255
+; CHECK-NEXT: ret i16 [[T6]]
;
-entry:
- %1 = and i16 %0, 255
- %2 = zext i16 %1 to i32
- %3 = icmp ult i32 %2, 255
- %4 = select i1 %3, i32 %2, i32 255
- %5 = trunc i32 %4 to i16
- %6 = and i16 %5, 255
- ret i16 %6
+ %t1 = and i16 %x, 255
+ %t2 = zext i16 %t1 to i32
+ %t3 = icmp ult i32 %t2, 255
+ %t4 = select i1 %t3, i32 %t2, i32 255
+ %t5 = trunc i32 %t4 to i16
+ %t6 = and i16 %t5, 255
+ ret i16 %t6
}
+
More information about the llvm-commits
mailing list