Files
clang-p2996/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
Nikita Popov abac5be673 [InstCombine] Fix APInt ctor assertion
The (extended) bit width might not fit into the (non-extended)
type, resulting in an incorrect truncation of the compared value.

Fix this by using m_SpecificInt(), which is both simpler and
handles this correctly.

Fixes the assertion failure reported in:
https://github.com/llvm/llvm-project/pull/114539#issuecomment-2485799395
2024-11-19 15:17:59 +01:00

111 KiB