[all-commits] [llvm/llvm-project] 1060a6: [SimplifyCFG][DirectX] Honor target minimum lookup...

Farzon Lotfi via All-commits all-commits at lists.llvm.org
Fri Jun 12 12:05:49 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1060a6be0a471106fd65a3f16937ee1c588dabed
      https://github.com/llvm/llvm-project/commit/1060a6be0a471106fd65a3f16937ee1c588dabed
  Author: Farzon Lotfi <farzonlotfi at microsoft.com>
  Date:   2026-06-12 (Fri, 12 Jun 2026)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Target/DirectX/DirectXTargetTransformInfo.cpp
    M llvm/lib/Target/DirectX/DirectXTargetTransformInfo.h
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    A llvm/test/CodeGen/DirectX/switch-to-lookup-table-i16-narrowing.ll
    A llvm/test/CodeGen/DirectX/switch-to-lookup-table-no-i8-narrowing.ll

  Log Message:
  -----------
  [SimplifyCFG][DirectX] Honor target minimum lookup table element width (#203103)

fixes #202481

This change adds a `TTI::getMinimumLookupTableEntryBitWidth()` (default
`8`) and fold it
into SimplifyCFG's `NeededBitWidth` computation so targets can prevent
unsupported
narrow lookup tables. DirectX returns 32 (or 16 with native 16-bit
types) so tables
never narrow to the unsupported i8 type.


> Assisted by Claude Opus 4.8



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