[all-commits] [llvm/llvm-project] 2c5d1b: [DAGCombiner] Reassociate the operands from (OR (O...
Konstantina Mitropoulou via All-commits
all-commits at lists.llvm.org
Tue Aug 8 20:08:38 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2c5d1b5ab7034be70eb3c6249b9a2fd512ffb658
https://github.com/llvm/llvm-project/commit/2c5d1b5ab7034be70eb3c6249b9a2fd512ffb658
Author: Konstantina Mitropoulou <Konstantina.Mitropoulou at amd.com>
Date: 2023-08-08 (Tue, 08 Aug 2023)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/AMDGPU/combine_andor_with_cmps.ll
M llvm/test/CodeGen/AMDGPU/wave32.ll
M llvm/test/CodeGen/Hexagon/isel/logical.ll
M llvm/test/CodeGen/X86/v8i1-masks.ll
Log Message:
-----------
[DAGCombiner] Reassociate the operands from (OR (OR(CMP1, CMP2)), CMP3) to (OR (OR(CMP1, CMP3)), CMP2)
This happens when CMP1 and CMP3 have the same predicate (or CMP2 and CMP3 have
the same predicate).
This helps optimizations such as the fololowing one:
CMP(A,C)||CMP(B,C) => CMP(MIN/MAX(A,B), C)
CMP(A,C)&&CMP(B,C) => CMP(MIN/MAX(A,B), C)
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D156215
More information about the All-commits
mailing list