Reapply "clang: Use TargetID parsing from AMDGPUTargetParser" (#213824) (#213847)
This reverts commit 8f82ba2c79f4e6a69a884cc9e19bd0b8c0bbe932.
Clang subarch patches have landed, so the prematurely build bots should be OK now.
[TargetInstrInfo] Disable size verification for EH_LABEL (#223641)
EH_LABEL may produce a nop if using async exceptions and followed
by a trapping instruction.
Suppress the verification error until the incorrect size reporting
is fixed.
IR: Introduce "exception-model" module flag (#220052)
Add an "exception-model" IR module flag intended to replace
TargetOptions::ExceptionModel, such that the ABI is fully
computable from the IR alone. Add the basic documentation and
verifier/linker tests, but doesn't wire up the consumers.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
LICM: Drop -licm-force-thread-model-single in favor of the module flag (#223158)
Now that the threading model is carried by the "thread-model" IR module
flag, the hidden -licm-force-thread-model-single override is redundant: a test
can select the single-threaded model by setting the module flag directly.
isThreadLocalObject reads only Module::getThreadModel.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[LLVM][CodeGen][SVE] Add isel for constrained cast operations. (#221976)
Implements lowering for constrained variants of fpext, fptosi, fptoui,
fptrunc, rint, sitofp and uitofp. Support covers scalable vectors of
half, float and double element type, with bfloat support due in a
follow-up PR.
[SPIR-V] Emit extra DebugExpression ops under NonSemantic.Shader.DebugInfo.200
Map DWARF ops beyond Fragment only when -spirv-nonsemantic-debug-info-version=200.
[VPlan] Use frozen combined condition in early exit first-active-lane
Combined is used both to compute if an early exit was taken via VPInstruction::AnyOf, as well as the index of the early-exited lane in VPInstruction::FirstActiveLane.
Combined can have poison lanes past the exited lane, so the AnyOf uses freeze to prevent branching on poison. However FirstActiveLane on a vector with a poison lane is poison, so we need to also use the frozen version of Combined to prevent poison there.
[VPlan] Fix VPInstruction::AnyOf combine undoing freeze
There is an any-of combine for unrolled VPlans which does:
any-of (fcmp uno A, A), (fcmp uno B, B), ...-> any-of (fcmp uno A, B)
However any-of implicitly freezes each individual operand and this means we go from `freeze (fcmp uno A, A)` to `freeze (fcmp uno A, B)` which isn't sound: alive2.llvm.org/ce/z/UdQM7C
This causes miscompiles today with early exit loops, see the attached test case in single-early-exit-anyof-fold.ll.
This fixes it by explicitly modelling the freeze in VPlan. There are three places where we use AnyOf:
1) early exit loops: the freeze needs to be applied per-lane, so apply it to `(any-of (freeze (combined-conds-to-exit)))`
2) handleMaxMinNumReductions: If any lane of the reduction was poison in the scalar loop, the final result will be poison. We only need to freeze the result of AnyOf to prevent immediate UB when branching. Freezing individual operands blocks the any-of combine otherwise.
3) handleFindLastReductions: we need to freeze Cond itself since it's got multiple uses, but I plan on fixing this in a separate PR