HomePhabricator

[LV] Logical and/or select costs

Authored by dmgreen on Apr 8 2021, 2:39 AM.

Description

[LV] Logical and/or select costs

D99674 stopped the folding of certain select operations into and/or, due
to incorrect folding in the presence of poison. D97360 added some costs
to attempt to account for the change, but only worked at the getUserCost
level, not the getCmpSelInstrCost that the vectorizer will use directly.
This adds similar logic into the vectorizer to handle these logical
and/or selects, treating them like and/or directly.

This fixes 60% performance regressions from code like the attached test
case.

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

Details

Committed
dmgreenApr 8 2021, 2:39 AM
Differential Revision
D99884: [LV] Logical and/or select costs
Parents
rG1a4d3d0bca2b: [LV] Add a logical and/or select cost test. NFC
Branches
Unknown
Tags
Unknown