mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 16:37:42 +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:
parent
9944b76cfe
commit
b30ee6a41a
@ -1670,9 +1670,10 @@ unsigned ISel::SelectExpr(SDOperand N, bool Recording) {
|
||||
|
||||
// If the false value is simple enough, evaluate it inline in the false
|
||||
// block.
|
||||
if (isa<ConstantSDNode>(N.getOperand(3)) ||
|
||||
isa<ConstantFPSDNode>(N.getOperand(3)) ||
|
||||
isa<GlobalAddressSDNode>(N.getOperand(3)))
|
||||
if (N.getOperand(3).Val->hasOneUse() &&
|
||||
(isa<ConstantSDNode>(N.getOperand(3)) ||
|
||||
isa<ConstantFPSDNode>(N.getOperand(3)) ||
|
||||
isa<GlobalAddressSDNode>(N.getOperand(3))))
|
||||
FalseValue = 0;
|
||||
else
|
||||
FalseValue = SelectExpr(N.getOperand(3));
|
||||
|
Loading…
x
Reference in New Issue
Block a user