[all-commits] [llvm/llvm-project] abac5b: [InstCombine] Fix APInt ctor assertion
Nikita Popov via All-commits
all-commits at lists.llvm.org
Tue Nov 19 06:18:27 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: abac5be673a2053cceab8ce25009722e45021b9f
https://github.com/llvm/llvm-project/commit/abac5be673a2053cceab8ce25009722e45021b9f
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-11-19 (Tue, 19 Nov 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
M llvm/test/Transforms/InstCombine/conditional-variable-length-signext-after-high-bit-extract.ll
Log Message:
-----------
[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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list