This is an archive of the discontinued LLVM Phabricator instance.

[IR][InstCombine] Support scalable vector splats ConstantExprs in Constant::getUniqueInteger().
ClosedPublic

Authored by craig.topper on Sep 26 2022, 1:18 PM.

Details

Summary

I've left the getAggregateElement as a fast path for non-ConstantExprs
to avoid a call to getSplatValue in release builds.

Fixes PR57989.

Diff Detail

Event Timeline

craig.topper created this revision.Sep 26 2022, 1:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 26 2022, 1:18 PM
craig.topper requested review of this revision.Sep 26 2022, 1:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 26 2022, 1:18 PM
spatel accepted this revision.Sep 26 2022, 2:34 PM

LGTM, but please add the fast path comment to the code too, so the explanation for this code structure is obvious.

This revision is now accepted and ready to land.Sep 26 2022, 2:34 PM