Do not hack on volatile loads. I'm not sure what the point of a volatile load

from constant memory is, but lets not take chances.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10765 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-01-12 04:13:56 +00:00
parent 1daee8b010
commit 5f16a13896

View File

@ -2064,6 +2064,8 @@ static Constant *GetGEPGlobalInitializer(Constant *C, ConstantExpr *CE) {
Instruction *InstCombiner::visitLoadInst(LoadInst &LI) {
Value *Op = LI.getOperand(0);
if (LI.isVolatile()) return 0;
if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(Op))
Op = CPR->getValue();