summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-01-15 16:22:26 +0000
committerSanjay Patel <spatel@rotateright.com>2017-01-15 16:22:26 +0000
commitfba2df8d0f21a304f2904fc3baa270badaebadc0 (patch)
treeae49d6b1f1e54ce2f7b8d1c4950b4d3d671e5d4c
parented5eb933840f85fd3db135cc6f8d7a847c7921e4 (diff)
downloadbcm5719-llvm-fba2df8d0f21a304f2904fc3baa270badaebadc0.tar.gz
bcm5719-llvm-fba2df8d0f21a304f2904fc3baa270badaebadc0.zip
[InstCombine] add explanatory comments to tests; NFC
llvm-svn: 292063
-rw-r--r--llvm/test/Transforms/InstCombine/signext.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/signext.ll b/llvm/test/Transforms/InstCombine/signext.ll
index 66cee2460eb..fea485d8e7e 100644
--- a/llvm/test/Transforms/InstCombine/signext.ll
+++ b/llvm/test/Transforms/InstCombine/signext.ll
@@ -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>
OpenPOWER on IntegriCloud