summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/apint-add.ll
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-07-16 18:24:18 +0000
committerSanjay Patel <spatel@rotateright.com>2016-07-16 18:24:18 +0000
commit040bd16e562b3354562d1d334bf290fde5f57fd6 (patch)
tree8760d1bba5de87a064d3bfca84f6cca0449f0c3a /llvm/test/Transforms/InstCombine/apint-add.ll
parente203b610fa965187e1c3fbbd5a8c153374adab76 (diff)
downloadbcm5719-llvm-040bd16e562b3354562d1d334bf290fde5f57fd6.tar.gz
bcm5719-llvm-040bd16e562b3354562d1d334bf290fde5f57fd6.zip
add vector test to show missing transform
llvm-svn: 275690
Diffstat (limited to 'llvm/test/Transforms/InstCombine/apint-add.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/apint-add.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/apint-add.ll b/llvm/test/Transforms/InstCombine/apint-add.ll
index a9e7e57463c..f27af7b60cc 100644
--- a/llvm/test/Transforms/InstCombine/apint-add.ll
+++ b/llvm/test/Transforms/InstCombine/apint-add.ll
@@ -33,6 +33,16 @@ define i15 @test3(i15 %x) {
ret i15 %tmp.4
}
+; X + signbit --> X ^ signbit
+define <2 x i5> @test3vec(<2 x i5> %x) {
+; CHECK-LABEL: @test3vec(
+; CHECK-NEXT: [[Y:%.*]] = add <2 x i5> %x, <i5 -16, i5 -16>
+; CHECK-NEXT: ret <2 x i5> [[Y]]
+;
+ %y = add <2 x i5> %x, <i5 16, i5 16>
+ ret <2 x i5> %y
+}
+
;; (x & 0b1111..0) + 1 -> x | 1
define i49 @test4(i49 %x) {
; CHECK-LABEL: @test4(
OpenPOWER on IntegriCloud