mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 09:18:30 +00:00
comment cleanup, reduce nesting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75398 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a3c8d38795
commit
2514278b83
@ -1331,12 +1331,13 @@ bool X86DAGToDAGISel::SelectLEAAddr(SDValue Op, SDValue N,
|
||||
if (AM.Disp && (AM.Base.Reg.getNode() || AM.IndexReg.getNode()))
|
||||
Complexity++;
|
||||
|
||||
if (Complexity > 2) {
|
||||
SDValue Segment;
|
||||
getAddressOperands(AM, Base, Scale, Index, Disp, Segment);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
// If it isn't worth using an LEA, reject it.
|
||||
if (Complexity < 2)
|
||||
return false;
|
||||
|
||||
SDValue Segment;
|
||||
getAddressOperands(AM, Base, Scale, Index, Disp, Segment);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// SelectTLSADDRAddr - This is only run on TargetGlobalTLSAddress nodes.
|
||||
|
@ -1409,7 +1409,9 @@ def ATOMUMAX64: I<0, Pseudo, (outs GR64:$dst),(ins i64mem:$ptr, GR64:$val),
|
||||
// Non-Instruction Patterns
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// ConstantPool GlobalAddress, ExternalSymbol, and JumpTable
|
||||
// ConstantPool GlobalAddress, ExternalSymbol, and JumpTable when not in small
|
||||
// code model mode, should use 'movabs'. FIXME: This is really a hack, the
|
||||
// 'movabs' predicate should handle this sort of thing.
|
||||
def : Pat<(i64 (X86Wrapper tconstpool :$dst)),
|
||||
(MOV64ri tconstpool :$dst)>, Requires<[NotSmallCode]>;
|
||||
def : Pat<(i64 (X86Wrapper tjumptable :$dst)),
|
||||
@ -1421,7 +1423,7 @@ def : Pat<(i64 (X86Wrapper texternalsym:$dst)),
|
||||
|
||||
// If we have small model and -static mode, it is safe to store global addresses
|
||||
// directly as immediates. FIXME: This is really a hack, the 'imm' predicate
|
||||
// should handle this sort of thing.
|
||||
// for MOV64mi32 should handle this sort of thing.
|
||||
def : Pat<(store (i64 (X86Wrapper tconstpool:$src)), addr:$dst),
|
||||
(MOV64mi32 addr:$dst, tconstpool:$src)>,
|
||||
Requires<[SmallCode, IsStatic]>;
|
||||
|
Loading…
Reference in New Issue
Block a user