[llvm] [LV] Peek through bitcasts when performing CSE (PR #146856)

Pedro Lobo via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 5 09:32:49 PDT 2025


pedroclobo wrote:

> This pattern was found when diagnosing an assembly regression in 7zip.

Sorry, I meant IR, not assembly. The assembly regression associated with this particular test had another root cause. 
Sorry for the mix-up.

Despite generating identical assembly, I added the `bitcast` to the CSE worklist in order to avoid generated IR differences between upstream Clang and the prototype introducing the byte type.

I opened this PR as I thought it may be beneficial to upstream this change, although this invariant `shufflevector` + `bitcast` pattern might be somewhat rare (among the servers I could test this on, it only showed up on one with an older Intel CPU).

https://github.com/llvm/llvm-project/pull/146856


More information about the llvm-commits mailing list