3 ; RUN: llc < %s -mtriple=x86_64-linux -noop-insertion | FileCheck %s
4 ; RUN: llc < %s -mtriple=x86_64-linux -noop-insertion -rng-seed=1 | FileCheck %s --check-prefix=SEED1
5 ; RUN: llc < %s -mtriple=x86_64-linux -noop-insertion -rng-seed=20 | FileCheck %s --check-prefix=SEED2
6 ; RUN: llc < %s -mtriple=x86_64-linux -noop-insertion -rng-seed=500 | FileCheck %s --check-prefix=SEED3
8 ; RUN: llc < %s -march=x86 -noop-insertion | FileCheck %s --check-prefix=x86_32
10 ; This test case checks that NOOPs are inserted, and that the RNG seed
11 ; affects both the placement (position of imull) and choice of these NOOPs.
13 ; It just happens that with a default percentage of 25% and seed=0,
14 ; no NOOPs are inserted.
20 ; SEED1: leaq (%rsi), %rsi
26 ; SEED2-NEXT: movq %rsp, %rsp
31 ; SEED3-NEXT: movq %rsp, %rsp
33 ; SEED3-NEXT: leaq (%rdi), %rdi
36 ; The operand of the following is used to distinguish from a movl NOOP
37 ; x86_32: movl 4(%esp),
40 ; x86_32-NEXT: movl %esp, %esp
43 define i32 @test1(i32 %x, i32 %y, i32 %z) {
46 %tmp2 = add i32 %tmp, %z