aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2024-03-25 20:13:53 -0700
committerGitHub <noreply@github.com>2024-03-25 20:13:53 -0700
commita6b870db091830844431f77eb47aa30fc1d70bed (patch)
treef6b49e6b344c21129343561d70cddb52b92440aa /clang/lib/Sema/SemaCodeComplete.cpp
parentcc3b6f94952e1184df44c2b039d21665116151ed (diff)
downloadllvm-a6b870db091830844431f77eb47aa30fc1d70bed.zip
llvm-a6b870db091830844431f77eb47aa30fc1d70bed.tar.gz
llvm-a6b870db091830844431f77eb47aa30fc1d70bed.tar.bz2
[RISCV] Enable sub(max, min) lowering for ABDS and ABDU (#86592)
We have the ISD nodes for representing signed and unsigned absolute difference. For RISCV, we have vector min/max in the base vector extension, so we can expand to the sub(max,min) lowering. We could almost use the default expansion, but since fixed length min/max are custom (not legal), the default expansion doesn't cover the fixed vector cases. The expansion here is just a copy of the generic code specialized to allow the custom min/max nodes to be created so they can in turn be legalized to the _vl variants. Existing DAG combines handle the recognition of absolute difference idioms and conversion into the respective ISD::ABDS and ISD::ABDU nodes. This change does have the net effect of potentially pushing a free floating zero/sign extend after the expansion, and we don't do a great job of folding that into later expressions. However, since in general narrowing can reduce required work (by reducing LMUL) this seems like the right general tradeoff.
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
0 files changed, 0 insertions, 0 deletions