mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Perform constant folding on operands of instructions with non-void
types, such as loads and calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71175 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a6b35e201f
commit
31e4c77fae
@ -12770,7 +12770,9 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (TD && I->getType()->getTypeID() == Type::VoidTyID) {
|
||||
if (TD &&
|
||||
(I->getType()->getTypeID() == Type::VoidTyID ||
|
||||
I->isTrapping())) {
|
||||
// See if we can constant fold its operands.
|
||||
for (User::op_iterator i = I->op_begin(), e = I->op_end(); i != e; ++i)
|
||||
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(i))
|
||||
|
Loading…
Reference in New Issue
Block a user