summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-12-15 11:16:20 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-12-15 11:16:20 +0000
commit552c8e960e9e88d3c96a467df2e37efa27eff7d2 (patch)
tree8bc97c5b90a9f8ea308ea18516cbd08c0b11e56d /llvm/test/CodeGen/PowerPC
parent4f590f28e7739f139f6a23ebe426fd4e1557d470 (diff)
downloadbcm5719-llvm-552c8e960e9e88d3c96a467df2e37efa27eff7d2.tar.gz
bcm5719-llvm-552c8e960e9e88d3c96a467df2e37efa27eff7d2.zip
[Power9] Allow AnyExt immediates for XXSPLTIB
In some situations, the BUILD_VECTOR node that builds a v18i8 vector by a splat of an i8 constant will end up with signed 8-bit values and other situations, it'll end up with unsigned ones. Handle both situations. Fixes PR31340. llvm-svn: 289804
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
-rw-r--r--llvm/test/CodeGen/PowerPC/power9-moves-and-splats.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/power9-moves-and-splats.ll b/llvm/test/CodeGen/PowerPC/power9-moves-and-splats.ll
index 54eea6ae828..fc676cc0885 100644
--- a/llvm/test/CodeGen/PowerPC/power9-moves-and-splats.ll
+++ b/llvm/test/CodeGen/PowerPC/power9-moves-and-splats.ll
@@ -152,6 +152,15 @@ entry:
ret <16 x i8> <i8 -127, i8 -127, i8 -127, i8 -127, i8 -127, i8 -127, i8 -127, i8 -127, i8 -127, i8 -127, i8 -127, i8 -127, i8 -127, i8 -127, i8 -127, i8 -127>
}
+define <16 x i8> @test13E127() {
+entry:
+; CHECK-LABEL: test13E127
+; CHECK: xxspltib 34, 200
+; CHECK-BE-LABEL: test13E127
+; CHECK-BE: xxspltib 34, 200
+ ret <16 x i8> <i8 200, i8 200, i8 200, i8 200, i8 200, i8 200, i8 200, i8 200, i8 200, i8 200, i8 200, i8 200, i8 200, i8 200, i8 200, i8 200>
+}
+
define <4 x i32> @test14(<4 x i32> %a, i32* nocapture readonly %b) {
entry:
; CHECK-LABEL: test14
OpenPOWER on IntegriCloud