[llvm-commits] [llvm] r42285 - in /llvm/trunk/lib/Target/X86: X86FloatingPoint.cpp X86ISelLowering.cpp X86ISelLowering.h X86InstrFPStack.td X86InstrInfo.cpp X86InstrInfo.td X86InstrSSE.td X86InstrX86-64.td X86RegisterInfo.cpp

Dan Gohman djg at cray.com
Tue Sep 25 10:22:26 PDT 2007


> +def X86cmp_new : SDNode<"X86ISD::CMP_NEW" ,     SDTX86CmpTest>;

X86ISD::CMP_NEW SelectionDAG nodes return an i32 flags value, however the
corresponding X86cmp_new pattern-matching nodes use SDTX86CmpTest, which has
no result values. Is this intentional? If so, how is the discrepancy handled?

> +def : Pat<(parallel (X86cmp_new GR8:$src1, 0), (implicit EFLAGS)),
> +          (NEW_TEST8rr GR8:$src1, GR8:$src1)>;

In the SelectionDAG IR, an SDNode can return multiple results. However, in
this GCC-RTL-like pattern langauge, where many things are supposed to directly
correspond to SelectionDAG counterparts, nodes can return at most one result.
They must be grouped together in a parallel to represent operations that have
multiple results. It seems like this will result in more discrepancies. Am I
misunderstanding something?

Dan

-- 
Dan Gohman, Cray Inc.



More information about the llvm-commits mailing list