[llvm] Fix APInt::concat for zero-width operands (PR #207475)
Yi Zhang via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 4 17:08:50 PDT 2026
================
@@ -952,6 +952,10 @@ class [[nodiscard]] APInt {
/// equivalent to:
/// (this->zext(NewWidth) << NewLSB.getBitWidth()) | NewLSB.zext(NewWidth)
APInt concat(const APInt &NewLSB) const {
+ if (getBitWidth() == 0)
----------------
cathyzhyi wrote:
yea, good point. Deleted the NewLSB.getBitWidth() == 0 check.
https://github.com/llvm/llvm-project/pull/207475
More information about the llvm-commits
mailing list