Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Unified Diff: tests_lit/llvm2ice_tests/randomize-regalloc.ll

Issue 456033003: Subzero: Randomize register assignment. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Remove redundancies. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/IceTargetLoweringX8632.cpp ('K') | « src/llvm2ice.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/randomize-regalloc.ll
diff --git a/tests_lit/llvm2ice_tests/randomize-regalloc.ll b/tests_lit/llvm2ice_tests/randomize-regalloc.ll
new file mode 100644
index 0000000000000000000000000000000000000000..7f148ebdea280c0d20663eede55ef22b9dc1e3f0
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/randomize-regalloc.ll
@@ -0,0 +1,39 @@
+; This is a smoke test of randomized register allocation.
+
+; RUN: %llvm2ice -rng-seed=1 -randomize-regalloc %s \
Jim Stichnoth 2014/08/14 01:10:29 Add an explicit -Om1 option. Also, add the rest o
wala 2014/08/15 03:37:23 Done.
+; RUN: | FileCheck %s --check-prefix=OPTM1
+; RUN: %llvm2ice -O2 -rng-seed=1 -randomize-regalloc %s \
+; RUN: | FileCheck %s --check-prefix=CHECK
+
+define <4 x i32> @mul_v4i32(<4 x i32> %a, <4 x i32> %b) {
+entry:
+ %res = mul <4 x i32> %a, %b
+ ret <4 x i32> %res
+; OPTM1-LABEL: mul_v4i32:
+; OPTM1: sub esp, 48
+; OPTM1: movups xmmword ptr [esp+32], xmm0
+; OPTM1: movups xmmword ptr [esp+16], xmm1
+; OPTM1: movups xmm1, xmmword ptr [esp+32]
+; OPTM1: movups xmm6, xmmword ptr [esp+32]
+; OPTM1: movups xmm3, xmmword ptr [esp+16]
+; OPTM1: pshufd xmm2, xmm6, 49
+; OPTM1: pshufd xmm4, xmm3, 49
+; OPTM1: pmuludq xmm1, xmm3
+; OPTM1: pmuludq xmm2, xmm4
+; OPTM1: shufps xmm1, xmm2, 136
+; OPTM1: pshufd xmm0, xmm1, 216
+; OPTM1: movups xmmword ptr [esp], xmm0
+; OPTM1: movups xmm0, xmmword ptr [esp]
+; OPTM1: add esp, 48
+; OPTM1: ret
+
+; CHECK-LABEL: mul_v4i32:
+; CHECK: movups xmm5, xmm0
+; CHECK: pshufd xmm0, xmm0, 49
+; CHECK: pshufd xmm2, xmm1, 49
+; CHECK: pmuludq xmm5, xmm1
+; CHECK: pmuludq xmm0, xmm2
+; CHECK: shufps xmm5, xmm0, 136
+; CHECK: pshufd xmm0, xmm5, 216
+; CHECK: ret
+}
« src/IceTargetLoweringX8632.cpp ('K') | « src/llvm2ice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698