1; RUN: llc -march=x86-64 < %s | not grep negq 2 3; These sequences don't need neg instructions; they can be done with 4; a single shift and sub each. 5 6define i64 @foo(i64 %x, i64 %y, i64 %n) nounwind { 7 %a = sub i64 0, %y 8 %b = shl i64 %a, %n 9 %c = add i64 %b, %x 10 ret i64 %c 11} 12define i64 @boo(i64 %x, i64 %y, i64 %n) nounwind { 13 %a = sub i64 0, %y 14 %b = shl i64 %a, %n 15 %c = add i64 %x, %b 16 ret i64 %c 17} 18