This is an archive of the discontinued LLVM Phabricator instance.

[LV] Add cost model for simd vector select instructions of type float
ClosedPublic

Authored by Allen on Jun 9 2023, 4:51 AM.

Details

Summary

For simd vector selects, use cmeq + bsl for v2f32/v4f32/v2f64, so their cost are cheep.
Fix https://github.com/llvm/llvm-project/issues/63082

Diff Detail

Event Timeline

Allen created this revision.Jun 9 2023, 4:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2023, 4:51 AM
Allen requested review of this revision.Jun 9 2023, 4:51 AM
Allen updated this revision to Diff 530151.Jun 9 2023, 9:41 PM

Hello. 2 sounds like an OK cost to me, as a fallback when we are not sure where the condition comes from.

Can you add v8f16 and v4f16 types too, to keep them consistent?

Allen updated this revision to Diff 532359.Jun 16 2023, 8:26 PM

add cost model for v8f16 and v4f16 types according comment

dmgreen accepted this revision.Jun 18 2023, 10:58 PM

Thanks. LGTM

This revision is now accepted and ready to land.Jun 18 2023, 10:58 PM
Allen updated this revision to Diff 532787.Jun 19 2023, 10:09 PM

rebase ot fix the conflict of commit d0f56c3e5

This revision was landed with ongoing or failed builds.Jun 19 2023, 10:14 PM
This revision was automatically updated to reflect the committed changes.