1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-- < %s | FileCheck %s
3 ; These sequences don't need neg instructions; they can be done with
4 ; a single shift and sub each.
6 define i64 @foo(i64 %x, i64 %y, i64 %n) nounwind {
9 ; CHECK-NEXT: movq %rdx, %rcx
10 ; CHECK-NEXT: movq %rdi, %rax
11 ; CHECK-NEXT: # kill: def $cl killed $cl killed $rcx
12 ; CHECK-NEXT: shlq %cl, %rsi
13 ; CHECK-NEXT: subq %rsi, %rax
20 define i64 @boo(i64 %x, i64 %y, i64 %n) nounwind {
23 ; CHECK-NEXT: movq %rdx, %rcx
24 ; CHECK-NEXT: movq %rdi, %rax
25 ; CHECK-NEXT: # kill: def $cl killed $cl killed $rcx
26 ; CHECK-NEXT: shlq %cl, %rsi
27 ; CHECK-NEXT: subq %rsi, %rax