This is an archive of the discontinued LLVM Phabricator instance.

[X86] Remove unreachable code in X86TargetTransformInfo.cpp
ClosedPublic

Authored by XinWang10 on Mar 13 2023, 2:23 AM.

Details

Summary

In Function getVectorInstrCost, situation Opcode == Instruction::ExtractElement
and Opcode == Instruction::InsertElement are all handled in the first 2 if-statements,
So we have no chance for the code in line 4401.

Diff Detail

Event Timeline

XinWang10 created this revision.Mar 13 2023, 2:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 13 2023, 2:23 AM
XinWang10 requested review of this revision.Mar 13 2023, 2:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 13 2023, 2:23 AM
RKSimon accepted this revision.Mar 14 2023, 9:42 AM

LGTM - was originally added in D20601 when we had much a weaker cost model

This revision is now accepted and ready to land.Mar 14 2023, 9:42 AM

Thanks for review~