mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-16 20:40:16 +00:00
[mips] Set flag isAsCheapAsAMove flag on instruction LUi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167345 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
efcc1aec64
commit
3c9c1ab7b7
@ -421,7 +421,7 @@ class shift_rotate_reg<bits<6> func, bits<5> isRotate, string instr_asm,
|
||||
// Load Upper Imediate
|
||||
class LoadUpper<bits<6> op, string instr_asm, RegisterClass RC, Operand Imm>:
|
||||
FI<op, (outs RC:$rt), (ins Imm:$imm16),
|
||||
!strconcat(instr_asm, "\t$rt, $imm16"), [], IIAlu> {
|
||||
!strconcat(instr_asm, "\t$rt, $imm16"), [], IIAlu>, IsAsCheapAsAMove {
|
||||
let rs = 0;
|
||||
let neverHasSideEffects = 1;
|
||||
let isReMaterializable = 1;
|
||||
|
@ -24,3 +24,28 @@ entry:
|
||||
}
|
||||
|
||||
declare void @foo2(i64)
|
||||
|
||||
define void @f5() nounwind {
|
||||
entry:
|
||||
; 32: lui $4, 1
|
||||
; 32: lui $4, 1
|
||||
|
||||
tail call void @f6(i32 65536) nounwind
|
||||
tail call void @f6(i32 65536) nounwind
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @f6(i32)
|
||||
|
||||
define void @f7() nounwind {
|
||||
entry:
|
||||
; 64: lui $4, 1
|
||||
; 64: lui $4, 1
|
||||
|
||||
tail call void @f8(i64 65536) nounwind
|
||||
tail call void @f8(i64 65536) nounwind
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @f8(i64)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user