[llvm] [ConstantFolding] Fold array to vector in ConstantFoldLoadThroughBitcast (PR #192775)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 19 03:33:29 PDT 2026
https://github.com/nikic requested changes to this pull request.
This looks like it will incorrectly handle vectors of non-byte-size type as well as vectors of over-aligned elements. At the least these need to be tested.
Though generally, I'm not sure having a special case for this is the right thing to do. I feel like we should be able to constant fold a reasonably-sized vector load, even if it does not happen to be from a matching array.
The current limit of 32 bytes does not even cover 512 bit vectors. Having some kind of limit here makes sense, but the current limit seems too low.
https://github.com/llvm/llvm-project/pull/192775
More information about the llvm-commits
mailing list