This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Remove scalable vector restriction in foldSelectOpOp
ClosedPublic

Authored by junparser on Dec 10 2020, 7:37 PM.

Details

Summary

As title, this simple patch just fix the fixed vector type restriction.

TestPlan: check-llvm

Diff Detail

Event Timeline

junparser created this revision.Dec 10 2020, 7:37 PM
junparser requested review of this revision.Dec 10 2020, 7:37 PM
sdesmalen added inline comments.Dec 11 2020, 1:24 AM
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
278

The test works already without this patch, so this change isn't actually tested.
(Because of TI->isCast here, I was expecting to see a cast instruction as one of the select operands)

junparser updated this revision to Diff 311480.Dec 13 2020, 8:18 PM

Address the comment, update the testcase. Also fix same issue in foldBitcastSelect.

junparser marked an inline comment as done.Dec 13 2020, 8:18 PM
RKSimon accepted this revision.Dec 15 2020, 4:14 AM

LGTM

This revision is now accepted and ready to land.Dec 15 2020, 4:14 AM