mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Make the fast-isel code for literal 0.0 a bit shorter/faster, since 0.0 is common. rdar://problem/9303592 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130338 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -164,8 +164,12 @@ unsigned FastISel::materializeRegForValue(const Value *V, MVT VT) {
|
||||
Reg =
|
||||
getRegForValue(Constant::getNullValue(TD.getIntPtrType(V->getContext())));
|
||||
} else if (const ConstantFP *CF = dyn_cast<ConstantFP>(V)) {
|
||||
// Try to emit the constant directly.
|
||||
Reg = FastEmit_f(VT, VT, ISD::ConstantFP, CF);
|
||||
if (CF->isZero()) {
|
||||
Reg = TargetMaterializeFloatZero(CF);
|
||||
} else {
|
||||
// Try to emit the constant directly.
|
||||
Reg = FastEmit_f(VT, VT, ISD::ConstantFP, CF);
|
||||
}
|
||||
|
||||
if (!Reg) {
|
||||
// Try to emit the constant by using an integer constant with a cast.
|
||||
|
Reference in New Issue
Block a user