[llvm] r292063 - [InstCombine] add explanatory comments to tests; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 15 08:22:27 PST 2017
Author: spatel
Date: Sun Jan 15 10:22:26 2017
New Revision: 292063
URL: http://llvm.org/viewvc/llvm-project?rev=292063&view=rev
Log:
[InstCombine] add explanatory comments to tests; NFC
Modified:
llvm/trunk/test/Transforms/InstCombine/signext.ll
Modified: llvm/trunk/test/Transforms/InstCombine/signext.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/signext.ll?rev=292063&r1=292062&r2=292063&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/signext.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/signext.ll Sun Jan 15 10:22:26 2017
@@ -61,6 +61,10 @@ define i32 @test5(i32 %x) {
ret i32 %tmp.4
}
+; If the shift amount equals the difference in width of the destination
+; and source scalar types:
+; ashr (shl (zext X), C), C --> sext X
+
define i32 @test6(i16 %P) {
; CHECK-LABEL: @test6(
; CHECK-NEXT: [[TMP_5:%.*]] = sext i16 %P to i32
@@ -72,6 +76,8 @@ define i32 @test6(i16 %P) {
ret i32 %tmp.5
}
+; FIXME: Vectors should get the same fold as above.
+
define <2 x i32> @test6_splat_vec(<2 x i12> %P) {
; CHECK-LABEL: @test6_splat_vec(
; CHECK-NEXT: [[Z:%.*]] = zext <2 x i12> %P to <2 x i32>
More information about the llvm-commits
mailing list