1 ; RUN: llc < %s -mtriple=x86_64-linux -rng-seed=5 -noop-insertion -noop-insertion-percentage=10 \
2 ; RUN: | FileCheck %s --check-prefix=PERCENT10
3 ; RUN: llc < %s -mtriple=x86_64-linux -rng-seed=5 -noop-insertion -noop-insertion-percentage=50 \
4 ; RUN: | FileCheck %s --check-prefix=PERCENT50
5 ; RUN: llc < %s -mtriple=x86_64-linux -rng-seed=5 -noop-insertion -noop-insertion-percentage=100 \
6 ; RUN: | FileCheck %s --check-prefix=PERCENT100
8 ; RUN: llc < %s -march=x86 -rng-seed=5 -noop-insertion -noop-insertion-percentage=100 \
9 ; RUN: | FileCheck %s --check-prefix=X86-PERCENT100
11 ; This test case tests NOOP insertion at varying percentage levels.
13 define i32 @test(i32 %x, i32 %y, i32 %z) {
24 %t10 = mul i32 %t9, %z
25 %t11 = add i32 %t10, %x
29 ; PERCENT10: movq %rbp, %rbp
32 ; PERCENT50: leaq (%rdi), %rdi
34 ; PERCENT50: movq %rbp, %rbp
35 ; PERCENT50: movq %rsp, %rsp
36 ; PERCENT50: leaq (%rsi), %rsi
40 ; PERCENT100: leaq (%rdi), %rdi
41 ; PERCENT100: leaq (%rdi), %rdi
43 ; PERCENT100: movq %rbp, %rbp
44 ; PERCENT100: movq %rsp, %rsp
47 ; PERCENT100: leaq (%rsi), %rsi
49 ; PERCENT100: leaq (%rdi), %rdi
50 ; PERCENT100: leaq (%rdi), %rdi
51 ; PERCENT100: leaq (%rsi), %rsi
55 ; X86-PERCENT100: leal (%edi), %edi
56 ; X86-PERCENT100: leal (%edi), %edi
58 ; X86-PERCENT100: movl %ebp, %ebp
59 ; X86-PERCENT100: movl %esp, %esp
62 ; X86-PERCENT100: leal (%esi), %esi
64 ; X86-PERCENT100: leal (%edi), %edi
65 ; X86-PERCENT100: leal (%edi), %edi
66 ; X86-PERCENT100: leal (%esi), %esi