1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; Test that update_llc_test_checks.py can run pre-processing commands.
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=CHECK-ADD
4 ; RUN: sed 's/add /sub /g' %s | llc -mtriple=x86_64-unknown-unknown \
5 ; RUN: | FileCheck %s --check-prefix=CHECK-SUB
6 ; Check that multiple pre-processing commands are handled
7 ; RUN: sed 's/add /sub /g' %s | sed 's/i64 /i16 /g' | cat \
8 ; RUN: | llc -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=CHECK-SUB-I16
10 define i64 @test_add_constant(i64 %arg) nounwind {
11 ; CHECK-ADD-LABEL: test_add_constant:
12 ; CHECK-ADD: # %bb.0: # %entry
13 ; CHECK-ADD-NEXT: leaq 6(%rdi), %rax
14 ; CHECK-ADD-NEXT: retq
16 ; CHECK-SUB-LABEL: test_add_constant:
17 ; CHECK-SUB: # %bb.0: # %entry
18 ; CHECK-SUB-NEXT: leaq -6(%rdi), %rax
19 ; CHECK-SUB-NEXT: retq
21 ; CHECK-SUB-I16-LABEL: test_add_constant:
22 ; CHECK-SUB-I16: # %bb.0: # %entry
23 ; CHECK-SUB-I16-NEXT: # kill: def $edi killed $edi def $rdi
24 ; CHECK-SUB-I16-NEXT: leal -6(%rdi), %eax
25 ; CHECK-SUB-I16-NEXT: # kill: def $ax killed $ax killed $eax
26 ; CHECK-SUB-I16-NEXT: retq