[llvm] [NFC] SimplifyCFG: Detect switch replacement earlier in `switchToLookup` (PR #155602)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 28 06:02:15 PDT 2025
================
@@ -6677,9 +6677,18 @@ Value *SwitchLookupTable::buildLookup(Value *Index, IRBuilder<> &Builder,
// Mask off.
return Builder.CreateTrunc(DownShifted, BitMapElementTy, "switch.masked");
}
- case ArrayKind: {
- Type *IndexTy = DL.getIndexType(Array->getType());
- auto *ArrayTy = cast<ArrayType>(Array->getValueType());
+ case LookupTableKind: {
+ // Only build lookup table when we have a target that supports it or the
+ // attribute is notable.
----------------
nikic wrote:
"or the attribute is notable"? What does that mean?
https://github.com/llvm/llvm-project/pull/155602
More information about the llvm-commits
mailing list