summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/vector-idiv.ll
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-04-26 23:09:49 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-04-26 23:09:49 +0000
commitda4841b3a90c19de590e99cb130f9dcc6babc970 (patch)
treee29c6e9f80fe0776cbe0cd36e0ec59ec66716dfe /llvm/test/CodeGen/X86/vector-idiv.ll
parent1129e9cec109acaf4d4659cad9133b0cb044d8bd (diff)
downloadbcm5719-llvm-da4841b3a90c19de590e99cb130f9dcc6babc970.tar.gz
bcm5719-llvm-da4841b3a90c19de590e99cb130f9dcc6babc970.zip
DAGCombiner: Simplify code a bit, make more transforms work with vectors.
llvm-svn: 207338
Diffstat (limited to 'llvm/test/CodeGen/X86/vector-idiv.ll')
-rw-r--r--llvm/test/CodeGen/X86/vector-idiv.ll35
1 files changed, 35 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/vector-idiv.ll b/llvm/test/CodeGen/X86/vector-idiv.ll
index 06af3434b1a..3b300f74061 100644
--- a/llvm/test/CodeGen/X86/vector-idiv.ll
+++ b/llvm/test/CodeGen/X86/vector-idiv.ll
@@ -151,3 +151,38 @@ define <8 x i32> @test9(<8 x i32> %a) {
; AVX: vpsrad $2
; AVX: vpadd
}
+
+define <8 x i32> @test10(<8 x i32> %a) {
+ %rem = urem <8 x i32> %a, <i32 7, i32 7, i32 7, i32 7,i32 7, i32 7, i32 7, i32 7>
+ ret <8 x i32> %rem
+
+; AVX-LABEL: test10:
+; AVX: vpermd
+; AVX: vpmuludq
+; AVX: vshufps $-35
+; AVX: vpmuludq
+; AVX: vshufps $-35
+; AVX: vpsubd
+; AVX: vpsrld $1
+; AVX: vpadd
+; AVX: vpsrld $2
+; AVX: vpmulld
+}
+
+define <8 x i32> @test11(<8 x i32> %a) {
+ %rem = srem <8 x i32> %a, <i32 7, i32 7, i32 7, i32 7,i32 7, i32 7, i32 7, i32 7>
+ ret <8 x i32> %rem
+
+; AVX-LABEL: test11:
+; AVX: vpermd
+; AVX: vpmuldq
+; AVX: vshufps $-35
+; AVX: vpmuldq
+; AVX: vshufps $-35
+; AVX: vpshufd $-40
+; AVX: vpadd
+; AVX: vpsrld $31
+; AVX: vpsrad $2
+; AVX: vpadd
+; AVX: vpmulld
+}
OpenPOWER on IntegriCloud