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

Unified Diff: tests_lit/llvm2ice_tests/nop-insertion.ll

Issue 463563006: Subzero: Randomly insert nops. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Remove redundancy and fix formatting. 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/IceTargetLoweringX8632.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/nop-insertion.ll
diff --git a/tests_lit/llvm2ice_tests/nop-insertion.ll b/tests_lit/llvm2ice_tests/nop-insertion.ll
new file mode 100644
index 0000000000000000000000000000000000000000..ff7e2dbbacd07cef9d56e76a1b02972412306c7b
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/nop-insertion.ll
@@ -0,0 +1,33 @@
+; This is a smoke test of nop insertion.
+
+; RUN: %llvm2ice -rng-seed=1 -insert-nops -nop-probability=50 %s | FileCheck %s
jvoung (off chromium) 2014/08/14 15:17:17 maybe test at 90% also, to test that the nop-proba
wala 2014/08/14 23:29:50 Done.
+
+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
+; CHECK-LABEL: mul_v4i32:
+; CHECK: sub esp, 48
+; CHECK: nop # length = 8 bytes
+; CHECK: movups xmmword ptr [esp+32], xmm0
+; CHECK: movups xmmword ptr [esp+16], xmm1
+; CHECK: nop # length = 5 bytes
+; CHECK: movups xmm2, xmmword ptr [esp+32]
+; CHECK: nop # length = 7 bytes
+; CHECK: movups xmm0, xmmword ptr [esp+32]
+; CHECK: movups xmm1, xmmword ptr [esp+16]
+; CHECK: pshufd xmm3, xmm0, 49
+; CHECK: pshufd xmm4, xmm1, 49
+; CHECK: nop # length = 9 bytes
+; CHECK: pmuludq xmm2, xmm1
+; CHECK: pmuludq xmm3, xmm4
+; CHECK: nop # length = 1 byte
+; CHECK: shufps xmm2, xmm3, 136
+; CHECK: pshufd xmm5, xmm2, 216
+; CHECK: movups xmmword ptr [esp], xmm5
+; CHECK: nop # length = 8 bytes
+; CHECK: movups xmm0, xmmword ptr [esp]
+; CHECK: nop # length = 7 bytes
+; CHECK: add esp, 48
+; CHECK: ret
+}
« src/IceTargetLoweringX8632.cpp ('K') | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698