]> granicus.if.org Git - llvm/commitdiff
[InstCombine] add explanatory comments to tests; NFC
authorSanjay Patel <spatel@rotateright.com>
Sun, 15 Jan 2017 16:22:26 +0000 (16:22 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sun, 15 Jan 2017 16:22:26 +0000 (16:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292063 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/signext.ll

index 66cee2460ebf1dd3f41714778bea906c74a230d0..fea485d8e7eb34671f611833617764dcd58e0232 100644 (file)
@@ -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>