mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Make sure expressions only have one use before emitting them into a place that is conditionally executed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22960 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1670,9 +1670,10 @@ unsigned ISel::SelectExpr(SDOperand N, bool Recording) {
|
|||||||
|
|
||||||
// If the false value is simple enough, evaluate it inline in the false
|
// If the false value is simple enough, evaluate it inline in the false
|
||||||
// block.
|
// block.
|
||||||
if (isa<ConstantSDNode>(N.getOperand(3)) ||
|
if (N.getOperand(3).Val->hasOneUse() &&
|
||||||
isa<ConstantFPSDNode>(N.getOperand(3)) ||
|
(isa<ConstantSDNode>(N.getOperand(3)) ||
|
||||||
isa<GlobalAddressSDNode>(N.getOperand(3)))
|
isa<ConstantFPSDNode>(N.getOperand(3)) ||
|
||||||
|
isa<GlobalAddressSDNode>(N.getOperand(3))))
|
||||||
FalseValue = 0;
|
FalseValue = 0;
|
||||||
else
|
else
|
||||||
FalseValue = SelectExpr(N.getOperand(3));
|
FalseValue = SelectExpr(N.getOperand(3));
|
||||||
|
Reference in New Issue
Block a user