[llvm] [CGP] Eliminate noop bitcasts (PR #146961)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 16:49:31 PDT 2025
preames wrote:
> Aren't no-op bitcasts the way how ConstantHoisting conveys opaque values to the backend?
I weakly believe that the opaque constant case is covered by the check just above:
```
if (isa<Constant>(CI->getOperand(0)))
return AnyChange;
```
I say weakly here because I'm not familiar with constant hoisting beyond a cursory level, and it might be I'm wrong here. I did a quick search through the code, but if there's something more subtle going on - maybe around the constant expr stuff? - I might have missed it.
https://github.com/llvm/llvm-project/pull/146961
More information about the llvm-commits
mailing list