HomePhabricator

[X86] Add a DAG combine to combine (sext (setcc)) with VLX

Description

[X86] Add a DAG combine to combine (sext (setcc)) with VLX

Normally target independent DAG combine would do this combine based on getSetCCResultType, but with VLX getSetCCResultType returns a vXi1 type preventing the DAG combining from kicking in.

But doing this combine can allow us to remove the explicit sign extend that would otherwise be emitted.

This patch adds a target specific DAG combine to combine the sext+setcc when the result type is the same size as the input to the setcc. I've restricted this to FP compares and things that can be represented with PCMPEQ and PCMPGT since we don't have full integer compare support on the older ISAs.

Differential Revision: https://reviews.llvm.org/D41850

Details

Committed
ctopperJan 9 2018, 10:14 AM
Differential Revision
D41850: [X86] Add a DAG combine to combine (sext (setcc)) with VLX
Parents
rL322100: [lli] Make lli support -mcpu=native for CPU autodetection
Branches
Unknown
Tags
Unknown