This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Add undef elements support for shrinkFPConstantVector
ClosedPublic

Authored by Chenbing.Zheng on Aug 21 2022, 8:40 PM.

Details

Summary

This patch add support for undef elements vector in shrinkFPConstantVector
function.

Diff Detail

Event Timeline

Chenbing.Zheng created this revision.Aug 21 2022, 8:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2022, 8:40 PM
Chenbing.Zheng requested review of this revision.Aug 21 2022, 8:40 PM
RKSimon added inline comments.Aug 22 2022, 2:11 AM
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
1679

Not sure Undef or ConstantFP are the only cases (ConstantExpr)? - so continue for Undef but the return nullptr if not ConstantFP ?

address comment

spatel accepted this revision.Aug 23 2022, 6:26 AM

LGTM

This revision is now accepted and ready to land.Aug 23 2022, 6:26 AM