[all-commits] [llvm/llvm-project] 03c8d6: [LegalizeDAG][RISCV][PowerPC][AMDGPU][WebAssembly]...
Craig Topper via All-commits
all-commits at lists.llvm.org
Tue Jan 12 10:57:16 PST 2021
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 03c8d6a0c4bd0016bdfd1e53e6878696fe6412ed
https://github.com/llvm/llvm-project/commit/03c8d6a0c4bd0016bdfd1e53e6878696fe6412ed
Author: Craig Topper <craig.topper at sifive.com>
Date: 2021-01-12 (Tue, 12 Jan 2021)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
M llvm/test/CodeGen/AMDGPU/setcc.ll
M llvm/test/CodeGen/PowerPC/spe.ll
M llvm/test/CodeGen/PowerPC/vsx.ll
M llvm/test/CodeGen/RISCV/double-br-fcmp.ll
M llvm/test/CodeGen/RISCV/double-fcmp.ll
M llvm/test/CodeGen/RISCV/double-select-fcmp.ll
M llvm/test/CodeGen/RISCV/float-br-fcmp.ll
M llvm/test/CodeGen/RISCV/float-fcmp.ll
M llvm/test/CodeGen/RISCV/float-select-fcmp.ll
M llvm/test/CodeGen/RISCV/half-br-fcmp.ll
M llvm/test/CodeGen/RISCV/half-fcmp.ll
M llvm/test/CodeGen/RISCV/half-select-fcmp.ll
M llvm/test/CodeGen/RISCV/rvv/setcc-fp-rv32.ll
M llvm/test/CodeGen/RISCV/rvv/setcc-fp-rv64.ll
M llvm/test/CodeGen/WebAssembly/comparisons-f32.ll
M llvm/test/CodeGen/WebAssembly/comparisons-f64.ll
M llvm/test/CodeGen/WebAssembly/simd-comparisons.ll
Log Message:
-----------
[LegalizeDAG][RISCV][PowerPC][AMDGPU][WebAssembly] Improve expansion of SETONE/SETUEQ on targets without SETO/SETUO.
If SETO/SETUO aren't legal, they'll be expanded and we'll end up
with 3 comparisons.
SETONE is equivalent to (SETOGT || SETOLT)
so if one of those operations is supported use that expansion. We
don't need both since we can commute the operands to make the other.
SETUEQ can be implemented with !(SETOGT || SETOLT) or (SETULE && SETUGE).
I've only implemented the first because it didn't look like most of the
affected targets had legal SETULE/SETUGE.
Reviewed By: frasercrmck, tlively, nemanjai
Differential Revision: https://reviews.llvm.org/D94450
More information about the All-commits
mailing list