mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
ConstantFoldConstantExpression can theoretically return the original
expression; don't go into an infinite loop if it does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95591 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
25ceb5f317
commit
54e72eca0c
@ -892,8 +892,10 @@ static const MCExpr *LowerConstant(const Constant *CV, AsmPrinter &AP) {
|
||||
// If the code isn't optimized, there may be outstanding folding
|
||||
// opportunities. Attempt to fold the expression using TargetData as a
|
||||
// last resort before giving up.
|
||||
if (Constant *C = ConstantFoldConstantExpression(CE, AP.TM.getTargetData()))
|
||||
return LowerConstant(C, AP);
|
||||
if (Constant *C =
|
||||
ConstantFoldConstantExpression(CE, AP.TM.getTargetData()))
|
||||
if (C != CE)
|
||||
return LowerConstant(C, AP);
|
||||
#ifndef NDEBUG
|
||||
CE->dump();
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user