[llvm] [InitUndef] Enable the InitUndef pass on all targets (PR #108353)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 03:06:43 PDT 2024
jayfoad wrote:
I don't think this has any benefit for AMDGPU. We use early-clobber to avoid some outputs overlapping with defined inputs, but it's OK for them to overlap with undef inputs. One specific example:
```
v_mad_u64_u32 v[9:10], null, v2, v3, v[8:9]
```
Here we generated a 64-bit integer multiply-add (v[9:10] = zext(v2) * zext(v3) + v[8:9]) but we're only using the low part of the result (v9 = v2 * v3 + v8). This means that the v9 (the high part of the addend input v[8:9]) is an undef input so it's OK for it to overlap with the output, even though the output is early-clobber.
https://github.com/llvm/llvm-project/pull/108353
More information about the llvm-commits
mailing list