This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel][X86] Fold FI/G_GEP into LDR/STR instruction addressing mode.
ClosedPublic

Authored by igorb on Jun 5 2017, 4:18 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

igorb created this revision.Jun 5 2017, 4:18 AM
zvi added inline comments.Jun 7 2017, 12:01 AM
lib/Target/X86/X86InstructionSelector.cpp
376 ↗(On Diff #101386)

Should we exit when optimizations are disabled?

igorb updated this revision to Diff 101680.Jun 7 2017, 3:10 AM
  • Make X86SelectAddress() always succeed.
guyblank accepted this revision.Jun 19 2017, 4:07 AM

LGTM

lib/Target/X86/X86InstructionSelector.cpp
376 ↗(On Diff #101386)

I think it is reasonable to always try to fold the address calculation.
It isn't a big effort to do so, and it simplifies the generated code.

This revision is now accepted and ready to land.Jun 19 2017, 4:07 AM
igorb updated this revision to Diff 103030.Jun 19 2017, 6:04 AM
  • rebase Thanks for the review.
This revision was automatically updated to reflect the committed changes.