mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
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:
@ -2064,6 +2064,8 @@ static Constant *GetGEPGlobalInitializer(Constant *C, ConstantExpr *CE) {
|
|||||||
|
|
||||||
Instruction *InstCombiner::visitLoadInst(LoadInst &LI) {
|
Instruction *InstCombiner::visitLoadInst(LoadInst &LI) {
|
||||||
Value *Op = LI.getOperand(0);
|
Value *Op = LI.getOperand(0);
|
||||||
|
if (LI.isVolatile()) return 0;
|
||||||
|
|
||||||
if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(Op))
|
if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(Op))
|
||||||
Op = CPR->getValue();
|
Op = CPR->getValue();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user