[all-commits] [llvm/llvm-project] 5ec135: [DAGCombiner] Change foldAndOrOfSETCC() to optimiz...
Konstantina Mitropoulou via All-commits
all-commits at lists.llvm.org
Thu Aug 24 10:49:20 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5ec13535235d07eafd64058551bc495f87c283b1
https://github.com/llvm/llvm-project/commit/5ec13535235d07eafd64058551bc495f87c283b1
Author: Konstantina Mitropoulou <Konstantina.Mitropoulou at amd.com>
Date: 2023-08-24 (Thu, 24 Aug 2023)
Changed paths:
M llvm/include/llvm/CodeGen/ISDOpcodes.h
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/AMDGPU/combine_andor_with_cmps.ll
M llvm/test/CodeGen/AMDGPU/fma.f16.ll
M llvm/test/CodeGen/AMDGPU/or.ll
Log Message:
-----------
[DAGCombiner] Change foldAndOrOfSETCC() to optimize and/or patterns with floating points.
CMP(A,C)||CMP(B,C) => CMP(MIN/MAX(A,B), C)
CMP(A,C)&&CMP(B,C) => CMP(MIN/MAX(A,B), C)
If the operands are proven to be non NaN, then the optimization can be applied
for all predicates.
We can apply the optimization for the following predicates for FMINNUM/FMAXNUM
(for quiet and signaling NaNs) and for FMINNUM_IEEE/FMAXNUM_IEEE if we can prove
that the operands are not signaling NaNs.
- ordered lt/le and ||
- ordered gt/ge and ||
- unordered lt/le and &&
- unordered gt/ge and &&
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D155267
More information about the All-commits
mailing list