This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Extend isel pattern coverage for BIC.
ClosedPublic

Authored by paulwalker-arm on Jan 27 2022, 6:50 AM.

Details

Summary

Adds patterns of the form "(and a, (not b)) -> bic".

NOTE: With this support I'm inclined to remove AArch64ISD::BIC, but will leave that investigation for another time.

Diff Detail

Event Timeline

paulwalker-arm created this revision.Jan 27 2022, 6:50 AM
paulwalker-arm requested review of this revision.Jan 27 2022, 6:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2022, 6:50 AM
david-arm accepted this revision.Jan 27 2022, 8:02 AM

LGTM!

llvm/test/CodeGen/AArch64/sve-int-log.ll
133

Looks like there is a potential optimisation here to remove the ptrue because we should just be able to reuse p0.b as the general predicate too, similar to this https://reviews.llvm.org/D118146.

This revision is now accepted and ready to land.Jan 27 2022, 8:02 AM

Thanks Dave. I've rebased and updated the patch to make use of the new multiclass.

david-arm accepted this revision.Jan 27 2022, 9:27 AM

LGTM! Even better. :;

This revision was landed with ongoing or failed builds.Jan 28 2022, 5:20 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Jan 28 2022, 5:31 AM

Looks like this breaks lld tests on Mac: http://45.33.8.238/macm1/26613/step_10.txt

Please take a look and revert for now if it takes a while to fix.

paulwalker-arm added a comment.EditedJan 28 2022, 5:34 AM

Looks like this breaks lld tests on Mac: http://45.33.8.238/macm1/26613/step_10.txt

Please take a look and revert for now if it takes a while to fix.

Are you sure? This is an SVE specific isel patch so it's not immediate obviously how it would affect aarch64-adrp-ldr-got.s which only runs llvm-mc, lld and llvm-objdump.

The bot cycled green on the next run, so it looks like it's a flaky test. Sorry for the noise.