[llvm-commits] [llvm] r140966 - in /llvm/trunk/lib/Transforms: InstCombine/InstCombineSelect.cpp Utils/CloneFunction.cpp
Duncan Sands
baldrick at free.fr
Sun Oct 2 03:38:27 PDT 2011
Hi Nick,
> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp (original)
> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp Sun Oct 2 04:12:55 2011
> @@ -324,9 +324,14 @@
> }
>
> // All operands were constants, fold it.
> - if (ConstOps.size() == I->getNumOperands())
> + if (ConstOps.size() == I->getNumOperands()) {
> + if (LoadInst *LI = dyn_cast<LoadInst>(I))
> + if (!LI->isVolatile())
> + return ConstantFoldLoadFromConstPtr(ConstOps[0], TD);
shouldn't ConstantFoldLoadFromConstPtr refuse to fold volatile loads?
Ciao, Duncan.
More information about the llvm-commits
mailing list