This is an archive of the discontinued LLVM Phabricator instance.

DAG: Allow matching fminnum/fmaxnum from vselect
ClosedPublic

Authored by arsenm on Aug 12 2018, 12:38 PM.

Diff Detail

Event Timeline

arsenm created this revision.Aug 12 2018, 12:38 PM

Adding more potential reviewers.
I don't know how to read AMDGPU output. Is it possible to expose the difference on x86 or AArch64? Or use MIR tests, so we're just seeing the expected DAG node names?

Adding more potential reviewers.
I don't know how to read AMDGPU output. Is it possible to expose the difference on x86 or AArch64? Or use MIR tests, so we're just seeing the expected DAG node names?

MIR tests don't work for the DAG. The important part is emitting v_pk_max_f16 for the v2f16/v4f16 for the GFX9-NNAN cases. I need to look into why this still doesn't work as expected for the v8f16 case

This revision is now accepted and ready to land.Aug 24 2018, 4:01 AM
RKSimon accepted this revision.Aug 24 2018, 4:36 AM

LGTM - not sure if its any better to split fmin_fmax_legacy.f16.ll into fmin_legacy.f16.ll and fmax_legacy.f16.ll - I find it sometimes useful to be able to diff these types of related test files against one another?

lib/CodeGen/SelectionDAG/DAGCombiner.cpp
7295

This bit can be comitted first as a NFC helper change?

arsenm closed this revision.Aug 24 2018, 2:25 PM

r340655