mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-30 07:00:57 +00:00
Fix a case where constantexprs could leak into the PPC isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15661 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c96bb817aa
commit
74a806cd3d
@ -1260,7 +1260,10 @@ void ISel::promote32(unsigned targetReg, const ValueRecord &VR) {
|
||||
if (Val) {
|
||||
if (Constant *C = dyn_cast<Constant>(Val)) {
|
||||
Val = ConstantExpr::getCast(C, Type::IntTy);
|
||||
Ty = Type::IntTy;
|
||||
if (isa<ConstantExpr>(Val)) // Could not fold
|
||||
Val = C;
|
||||
else
|
||||
Ty = Type::IntTy; // Folded!
|
||||
}
|
||||
|
||||
// If this is a simple constant, just emit a load directly to avoid the copy
|
||||
|
Loading…
Reference in New Issue
Block a user