llvm-project
33b2c265 - [X86] Fix assertion in AVX512 setcc combine due to invalid APInt mask width (#155775)

Commit
12 days ago
[X86] Fix assertion in AVX512 setcc combine due to invalid APInt mask width (#155775) The AVX512 setcc combine in X86ISelLowering was calling `APInt::getLowBitsSet` with a mask width (`Len`) that could exceed the bit width of the broadcasted scalar operand (`BroadcastOpVT.getSizeInBits()`), leading to assertion failures. This patch replaces `Len` with the number of defined (non-undef) elements in the constant pool vector. This ensures the generated mask is valid and avoids crashes when the constant pool contains more elements than the scalar bit width can represent. Fixes #155762
Parents
Loading