mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-11 06:06:52 +00:00
d7824e208a
e.g. %reg1024<def> = MOV r1 %reg1025<def> = ADD %reg1024, %reg1026 r0 = MOV %reg1025 If it's not possible / profitable to commute ADD, then turning ADD into a LEA saves a copy. llvm-svn: 68065
10 lines
433 B
LLVM
10 lines
433 B
LLVM
; RUN: llvm-as < %s | llc -march=x86-64 | not grep movq
|
|
|
|
define i64 @t(i64 %a, i64 %b) nounwind ssp {
|
|
entry:
|
|
%asmtmp = tail call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 1, i64 %a) nounwind ; <i64> [#uses=1]
|
|
%asmtmp1 = tail call i64 asm "rorq $1,$0", "=r,J,0,~{dirflag},~{fpsr},~{flags},~{cc}"(i32 1, i64 %b) nounwind ; <i64> [#uses=1]
|
|
%0 = add i64 %asmtmp1, %asmtmp ; <i64> [#uses=1]
|
|
ret i64 %0
|
|
}
|