[DirectX] Implement lowering of SampleGrad. Refactor sample lowering functions (#200871)
Fixes #192549
This PR builds atop #199745 by adding a helper `lowerSampleOp` function
to refactor `lowerSampleBias` and implement `lowerSampleGrad`.
The `lowerSampleGrad` implementation is very similar to
`lowerSampleBias`, just with ddx and ddy arguments instead of a bias.
Unlike SampleBias, SampleGrad is usable in all shader stages because it
has explicit gradient/derivative arguments.
Assisted-by: GitHub Copilot
[Legalizer] Add support for promoting integers for s/ucmp (#198554)
Instead of manually doing promotion in LowerUCMP of platforms like
PowerPC, we should have this logic in the legalizer.
[clang-doc] Wrap per thread arenas in an accessor for BUILD_SHARED
It seems like for BUILD_SHARED builds of the toolchain on Windows,
specifically aarch64-windows-gnu hosts, the use of the `thread_local`
variables in Representation.cpp causes an issue at link time due to
non-explicit export. Instead, just wrap them in an accessor function,
which should solve the issue in a cross platform way.
Fixes #200915
[DAG] Fold any-extend(and(trunc(x), C)) -> and(x, C) (#200052)
Fixes #195575
Fix a missed optimization in `DAGCombiner::visitANY_EXTEND` where the
pattern `any-extend(and(trunc(x), C))` was not being folded into `and(x,
C)` on X86, causing a redundant `movzbl` instruction to be emitted after
a small-mask AND.
[AArch64] Address issue reported in PR#196029 (#199122)
For certain types of truncating stores, the lowering action is set to
custom although no custom lowering exists for them.
This patch addresses issue reported in PR #196029 by removing the custom lowering entry.
Remove incorrect gcal link from C/C++ language wg (#201374)
The C and C++ language working group meets on the first and third Wed of
the month, but Google Calendar does not support doing this via a single
event. Instead, we have one event for recurring on the 1st Wed and a
second event for recurring on the 3rd Wed. That means we cannot use a
single gcal link for the event. Instead of listing two links, this
removes the gcal link entirely because the meeting is also listed on the
community calendar itself. This reduces confusion for folks, but it
would be nice to get a replacement link at some point.
[NVPTX] Respect FTZ flag when lowering atomicrmw fadd. (#200732)
Previously we unconditionally lowered LLVM atomicrmw fadd to PTX
atom.add. This is incorrect, because it ignores the FTZ behavior of the
LLVM and PTX instructions.
[LoopInterchange] Bail out if function that may diverge is called (#201348)
This patch fixes the issue pointed out in
https://github.com/llvm/llvm-project/pull/200828#issuecomment-4593914293.
As demonstrated by the test cases added in #201331, it is not legal to
interchange loops that contain call instructions which may diverge. This
patch adds an additional check and bails out early when we cannot prove
that a call instruction in the loops doesn't diverge.