diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2024-06-06 16:44:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-06 16:44:07 +0200 |
commit | 84b026690ded7f7728b6d1ba48b233b6ca8317eb (patch) | |
tree | 51992408b8eb77b5ef99a62b43f0ce3d74dcc62c /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 083a26682d1c4d2d6efb051cb2f658564eaa32ff (diff) | |
download | llvm-84b026690ded7f7728b6d1ba48b233b6ca8317eb.zip llvm-84b026690ded7f7728b6d1ba48b233b6ca8317eb.tar.gz llvm-84b026690ded7f7728b6d1ba48b233b6ca8317eb.tar.bz2 |
DAG: Pass flags to FoldConstantArithmetic (#93663)
There is simply way too much going on inside getNode. The complicated
constant folding of vector handling works by looking for build_vector
operands, and then tries to getNode the scalar element and then checks
if
constants were the result. As a side effect, this produces unused scalar
operation nodes (previously, without flags). If the vector operation
were later scalarized, it would find the flagless constant folding
temporary and lose the flag. I don't think this is a reasonable way for
constant folding to operate, but for now fix this by ensuring flags
on the original operation are preserved in the temporary.
This yields a clear code improvement for AMDGPU when f16 isn't legal.
The Wasm cases switch from using a libcall to compare and select. We are
evidently
missing the fcmp+select to fminimum/fmaximum handling, but this would be
further
improved when that's handled. AArch64 also avoids the libcall, but looks
worse and
has a different call for some reason.
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
0 files changed, 0 insertions, 0 deletions