33 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; 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-ADD4; RUN: sed 's/add /sub /g' %s | llc -mtriple=x86_64-unknown-unknown \5; RUN: | FileCheck %s --check-prefix=CHECK-SUB6; Check that multiple pre-processing commands are handled7; 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-I169 10define i64 @test_add_constant(i64 %arg) nounwind {11; CHECK-ADD-LABEL: test_add_constant:12; CHECK-ADD: # %bb.0: # %entry13; CHECK-ADD-NEXT: leaq 6(%rdi), %rax14; CHECK-ADD-NEXT: retq15;16; CHECK-SUB-LABEL: test_add_constant:17; CHECK-SUB: # %bb.0: # %entry18; CHECK-SUB-NEXT: leaq -6(%rdi), %rax19; CHECK-SUB-NEXT: retq20;21; CHECK-SUB-I16-LABEL: test_add_constant:22; CHECK-SUB-I16: # %bb.0: # %entry23; CHECK-SUB-I16-NEXT: # kill: def $edi killed $edi def $rdi24; CHECK-SUB-I16-NEXT: leal -6(%rdi), %eax25; CHECK-SUB-I16-NEXT: # kill: def $ax killed $ax killed $eax26; CHECK-SUB-I16-NEXT: retq27entry:28 %a1 = add i64 %arg, 129 %a2 = add i64 %a1, 230 %a3 = add i64 %a2, 331 ret i64 %a332}33