diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2008-02-26 18:37:49 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2008-02-26 18:37:49 +0000 |
| commit | b16c830b10ae478fb0f2df1723015e67888daf89 (patch) | |
| tree | 0655cdb4e01d169dc970fc839727d556bc2bce39 /lib/Transforms | |
| parent | 9a18e771d87651a220c0ae696fc765538b6f003d (diff) | |
| download | external_llvm-b16c830b10ae478fb0f2df1723015e67888daf89.zip external_llvm-b16c830b10ae478fb0f2df1723015e67888daf89.tar.gz external_llvm-b16c830b10ae478fb0f2df1723015e67888daf89.tar.bz2 | |
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
Diffstat (limited to 'lib/Transforms')
| -rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index e6f7283..15ccbbd 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -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); |
