[llvm-commits] [llvm] r76153 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp test/CodeGen/Alpha/2009-07-16-PromoteFloatCompare.ll

Eli Friedman eli.friedman at gmail.com
Fri Jul 17 01:12:10 PDT 2009


On Fri, Jul 17, 2009 at 1:00 AM, Jakob Stoklund Olesen<stoklund at 2pi.dk> wrote:
> When promoting an integer SETCC, there is a further problem:
> LegalizeOps happily promotes the operator, but the following DAG
> combiner run flips it back again - the promoted SETCC is matched by
> TargetLowering::SimplifySetCC().
>
> Would it be OK to add a isBeforeLegalizeOps() method on
> DagCombinerInfo? Then SimplifySetCC could check first:
>
> if (DCI.isBeforeLegalizeOps() || isOperationLegalOrCustom(ISD::SETCC,
> newVT))
>   ...replace SETCC node

Yes, that's exactly what we should be doing.

-Eli




More information about the llvm-commits mailing list