This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Implement isTruncateFree
ClosedPublic

Authored by samparker on Sep 6 2017, 7:28 AM.

Details

Summary

Implement the isTruncateFree hooks, lifted from AArch64, that are used by TargetTransformInfo. This allows simplifycfg to reduce the test case into a single basic block.

Diff Detail

Repository
rL LLVM

Event Timeline

samparker created this revision.Sep 6 2017, 7:28 AM
SjoerdMeijer accepted this revision.Sep 15 2017, 1:34 AM
SjoerdMeijer added a subscriber: SjoerdMeijer.

Looks reasonable to me.

lib/Target/ARM/ARMISelLowering.cpp
12182 ↗(On Diff #114007)

Nit: perhaps a comment why on ARM this is free as well? There's a comment about this in AArch64.

test/Transforms/SimplifyCFG/ARM/select-trunc-i64.ll
13 ↗(On Diff #114007)

Nit: indent off by 1

This revision is now accepted and ready to land.Sep 15 2017, 1:34 AM
This revision was automatically updated to reflect the committed changes.