3 ; RUN: llc < %s -mtriple=x86_64-linux -rng-seed=5 -noop-insertion -noop-insertion-percentage=10 \
4 ; RUN: | FileCheck %s --check-prefix=PERCENT10
5 ; RUN: llc < %s -mtriple=x86_64-linux -rng-seed=5 -noop-insertion -noop-insertion-percentage=50 \
6 ; RUN: | FileCheck %s --check-prefix=PERCENT50
7 ; RUN: llc < %s -mtriple=x86_64-linux -rng-seed=5 -noop-insertion -noop-insertion-percentage=100 \
8 ; RUN: | FileCheck %s --check-prefix=PERCENT100
10 ; RUN: llc < %s -march=x86 -rng-seed=5 -noop-insertion -noop-insertion-percentage=100 \
11 ; RUN: | FileCheck %s --check-prefix=X86-PERCENT100
13 ; This test case tests NOOP insertion at varying percentage levels.
15 define i32 @test(i32 %x, i32 %y, i32 %z) {
26 %t10 = mul i32 %t9, %z
27 %t11 = add i32 %t10, %x
31 ; PERCENT10: movq %rbp, %rbp
34 ; PERCENT50: leaq (%rdi), %rdi
36 ; PERCENT50: movq %rbp, %rbp
37 ; PERCENT50: movq %rsp, %rsp
38 ; PERCENT50: leaq (%rsi), %rsi
42 ; PERCENT100: leaq (%rdi), %rdi
43 ; PERCENT100: leaq (%rdi), %rdi
45 ; PERCENT100: movq %rbp, %rbp
46 ; PERCENT100: movq %rsp, %rsp
49 ; PERCENT100: leaq (%rsi), %rsi
51 ; PERCENT100: leaq (%rdi), %rdi
52 ; PERCENT100: leaq (%rdi), %rdi
53 ; PERCENT100: leaq (%rsi), %rsi
57 ; X86-PERCENT100: leal (%edi), %edi
58 ; X86-PERCENT100: leal (%edi), %edi
60 ; X86-PERCENT100: movl %ebp, %ebp
61 ; X86-PERCENT100: movl %esp, %esp
64 ; X86-PERCENT100: leal (%esi), %esi
66 ; X86-PERCENT100: leal (%edi), %edi
67 ; X86-PERCENT100: leal (%edi), %edi
68 ; X86-PERCENT100: leal (%esi), %esi