diff options
| author | Krzysztof Drewniak <Krzysztof.Drewniak@amd.com> | 2024-08-16 16:24:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-16 16:24:25 -0500 |
| commit | 70995a1a3379ed3c21b1c5da6723f04166cb0ae6 (patch) | |
| tree | 5c001ab84703ccf962a82675cb6e7ce14e9d3c1a /lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface/ScriptedProcessPythonInterface.cpp | |
| parent | f33d519cd471b1eec41c8b26f892ddb66bf8144f (diff) | |
[ScalarizeMaskedMemIntr] Optimize splat non-constant masks (#104537)
In cases (like the ones added in the tests) where the condition of a
masked load or store is a splat but not a constant (that is, a masked
operation is being used to implement patterns like "load if the current
lane is in-bounds, otherwise return 0"), optimize the 'scalarized' code
to perform an aligned vector load/store if the splat constant is true.
Additionally, take a few steps to preserve aliasing information and
names when nothing is scalarized while I'm here.
As motivation, some LLVM IR users will genatate masked load/store in
cases that map to this kind of predicated operation (where either the
vector is loaded/stored or it isn't) in order to take advantage of
hardware primitives, but on AMDGPU, where we don't have a masked load or
store, this pass would scalarize a load or store that was intended to be
- and can be - vectorized while also introducing expensive branches.
Fixes #104520
Pre-commit tests at #104527
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface/ScriptedProcessPythonInterface.cpp')
0 files changed, 0 insertions, 0 deletions
