[llvm] [SimplifyCFG] Fix Missing Case Computation for Arbitrary Width Integers (PR #77831)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 11 13:06:16 PST 2024
dtcxzyw wrote:
I don't think it is worth handing `switch i128` cases.
We can early exit if the bit width of condition value is larger than 64:
```
auto *CondTy = cast<IntegerType>(SI->getCondition()->getType());
if (CondTy->getIntegerBitWidth() > 64 ||
!DL.fitsInLegalInteger(CondTy->getIntegerBitWidth()))
return false;
```
https://github.com/llvm/llvm-project/pull/77831
More information about the llvm-commits
mailing list