Fix for pr2093: direct operands aren't necessarily addresses, so don't

try to simplify them.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47610 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Friedman
2008-02-26 18:37:49 +00:00
parent 36ab30102a
commit 9ec8095485
2 changed files with 19 additions and 1 deletions

View File

@@ -970,7 +970,8 @@ bool CodeGenPrepare::OptimizeInlineAsmInst(Instruction *I, CallSite CS,
// Compute the constraint code and ConstraintType to use.
OpInfo.ComputeConstraintToUse(*TLI);
if (OpInfo.ConstraintType == TargetLowering::C_Memory) {
if (OpInfo.ConstraintType == TargetLowering::C_Memory &&
OpInfo.isIndirect) {
Value *OpVal = OpInfo.CallOperandVal;
MadeChange |= OptimizeLoadStoreInst(I, OpVal, OpVal->getType(),
SunkAddrs);