[llvm-dev] Inst->replaceAllUsesWith and uses in ConstantExpr

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 16 16:05:13 PDT 2017


On 16 August 2017 at 15:39, (IIIT) Siddharth Bhat via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> From what I have observed, using `Inst->replaceAllUsesWith` does not replace
> uses of the `Inst` in `ConstantExpr`s. Is there some way to have a universal
> replaceAllUsesWith?

Where are you seeing instructions used in ConstantExprs? That sounds
really dodgy to me. Instructions are horribly non-Constant so I'd have
thought it would be banned (even for technically plausible things like
"and(i32 %inst, 0)").

Cheers.

Tim.


More information about the llvm-dev mailing list