This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] FastISel: Don't fallback to SelectionDAG after BuildMI in selectCall
ClosedPublic

Authored by sbc100 on Apr 19 2019, 11:35 AM.

Details

Summary

My understanding is that once BuildMI has been called we can't fallback
to SelectionDAG.

This change moves the fallback for when getRegForValue() fails for
that target of an indirect call. This was failing in -fPIC mode when
the callee is GlobalValue.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Apr 19 2019, 11:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2019, 11:35 AM

Looks like this was first introduced in rL319144, but none of our test cases currently hit the return.

I have so far failed to build fine a reasonable sized test case.

Attached my reproducer which hits this return when run with llc -fast-isel -filetype=obj -relocation-model=pic bad-reduced.bc

tlively accepted this revision.Apr 19 2019, 2:55 PM
This revision is now accepted and ready to land.Apr 19 2019, 2:55 PM
sbc100 updated this revision to Diff 195928.Apr 19 2019, 3:38 PM
  • add test
This revision was automatically updated to reflect the committed changes.