llvm.org GIT mirror llvm / release_26 test / CodeGen / X86 / avoid-lea-scale2.ll
release_26

Tree @release_26 (Download .tar.gz)

avoid-lea-scale2.ll @release_26raw · history · blame

1
2
3
4
5
6
7
; RUN: llvm-as < %s | llc -march=x86-64 | grep {leal.*-2(\[%\]rdi,\[%\]rdi)}

define i32 @foo(i32 %x) nounwind readnone {
  %t0 = shl i32 %x, 1
  %t1 = add i32 %t0, -2
  ret i32 %t1
}