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