diff options
author | Froster <34234343+Fros1er@users.noreply.github.com> | 2024-08-15 00:07:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-15 00:07:00 +0800 |
commit | 234cb4c6e3a382a5c0b3396647a1839699944ec0 (patch) | |
tree | 719b552e71d1206860e6abeff0e4bf82fd732e39 /libcxx/src/filesystem/filesystem_clock.cpp | |
parent | f3f465ed144b47223caa091b5ea65d7234955aa1 (diff) | |
download | llvm-234cb4c6e3a382a5c0b3396647a1839699944ec0.zip llvm-234cb4c6e3a382a5c0b3396647a1839699944ec0.tar.gz llvm-234cb4c6e3a382a5c0b3396647a1839699944ec0.tar.bz2 |
[SelectionDAG] Scalarize binary ops of splats before legal types (#100749)
Fixes #65072. This allows binary ops of splats to be scalarized if the
operation isn't legal on the element type isn't legal, but is legal on
the type it will be legalized to. I assume if an Op is legal both in
scalar and vector, choose scalar version should always be better no
matter what the type is.
There are some cases that my approach can't scalarize, for example:
``` llvm
; test/CodeGen/RISCV/rvv/select-int.ll
define <vscale x 4 x i64> @select_nxv4i64(i1 zeroext %c, <vscale x 4 x i64> %a, <vscale x 4 x i64> %b) {
%v = select i1 %c, <vscale x 4 x i64> %a, <vscale x 4 x i64> %b
ret <vscale x 4 x i64> %v
}
```
https://godbolt.org/z/xzqrKrxvK
`xor (splat i1, splat i1)` is generated in late step after LegalizeType,
from select. I didn't figure out how to make `xor i1, i1` legal at this
time.
---------
Co-authored-by: Luke Lau <luke@igalia.com>
Diffstat (limited to 'libcxx/src/filesystem/filesystem_clock.cpp')
0 files changed, 0 insertions, 0 deletions