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

Side by Side Diff: tests_lit/llvm2ice_tests/randomize-immediates.ll

Issue 460233002: Subzero: Randomize immediates by constant blinding or pooling. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Comments round 1 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 unified diff | Download patch
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; This is a smoke test of constant blinding and constant pooling.
2
3 ; RUN: %llvm2ice -O2 -rng-seed=1 -randomize-immediates=constant-blinding %s \
4 ; RUN: | FileCheck %s --check-prefix=BLINDING
5 ; RUN: %llvm2ice -O2 -rng-seed=1 -randomize-immediates=constant-pooling %s \
6 ; RUN: | FileCheck %s --check-prefix=POOLING
7
8 define i32 @add_arg_plus_200000(i32 %arg) {
9 entry:
10 %res = add i32 200000, %arg
11 ret i32 %res
12 ; BLINDING-LABEL: add_arg_plus_200000:
13 ; BLINDING: mov [[REG:e[a-z]*]], 16807
14 ; BLINDING: xor [[REG]], 216295
15
16 ; POOLING-LABEL: add_arg_plus_200000:
17 ; POOLING: mov e{{[a-z]*}}, dword ptr [L$i32$0]
18 }
19
20 define float @load_arg_plus_200000(float* %arg) {
21 entry:
22 %arg.int = ptrtoint float* %arg to i32
23 %addr.int = add i32 %arg.int, 200000
24 %addr.ptr = inttoptr i32 %addr.int to float*
25 %addr.load = load float* %addr.ptr, align 4
26 ret float %addr.load
27 ; BLINDING-LABEL: load_arg_plus_200000:
28 ; BLINDING: mov [[REG:e[a-z]*]], 282475249
29 ; BLINDING: xor [[REG]], 282408881
30 ; BLINDING: lea eax, dword ptr [eax+[[REG]]]
31
32 ; POOLING-LABEL: load_arg_plus_200000:
33 ; POOLING: mov [[REG:e[a-z]*]], dword ptr [L$i32$0]
34 ; POOLING: lea eax, dword ptr [eax+[[REG]]]
35 }
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698