[all-commits] [llvm/llvm-project] c4d3ee: [X86] Fold nested select_cc to select (cmp*ge/le C...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Thu Jun 24 03:43:05 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c4d3eedc7f1a954ba3a21af5fc9d4f8ecb37a6ac
https://github.com/llvm/llvm-project/commit/c4d3eedc7f1a954ba3a21af5fc9d4f8ecb37a6ac
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2021-06-24 (Thu, 24 Jun 2021)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/sdiv_fix_sat.ll
M llvm/test/CodeGen/X86/udiv_fix_sat.ll
Log Message:
-----------
[X86] Fold nested select_cc to select (cmp*ge/le Cond0, Cond1), LHS, Y)
select (cmpeq Cond0, Cond1), LHS, (select (cmpugt Cond0, Cond1), LHS, Y) --> (select (cmpuge Cond0, Cond1), LHS, Y)
etc,
We already perform this fold in DAGCombiner for MVT::i1 comparison results, but these can still appear after legalization (in x86 case with MVT::i8 results), where we need to be more careful about generating new comparison codes.
Pulled out of D101074 to help address the remaining regressions.
Differential Revision: https://reviews.llvm.org/D104707
More information about the All-commits
mailing list