This is an archive of the discontinued LLVM Phabricator instance.

Only use IR intrinsincs for __builtin_longjmp / __builtin_setjmp when the target supports them.
ClosedPublic

Authored by joerg on Feb 20 2015, 11:39 AM.

Details

Summary

Ruby is currently crashing on ARM because SelectionDAG turns llvm.eh.sjlj.longjmp and llvm.eh.sjlj.setjmp into nonsense, if the target has no lowering for them. Handle this properly in the frontend by not using the IR intrinsics unless the platform is known to have a working implementation. As documented with the FIXME, the Darwin lowering does not qualify either, it is written strictly for use by EH.

Diff Detail

Event Timeline

joerg updated this revision to Diff 20422.Feb 20 2015, 11:39 AM
joerg retitled this revision from to Only use IR intrinsincs for __builtin_longjmp / __builtin_setjmp when the target supports them..
joerg updated this object.
joerg edited the test plan for this revision. (Show Details)
joerg added reviewers: grosbach, t.p.northover, hans.
joerg added a subscriber: Unknown Object (MLST).
grosbach edited edge metadata.Feb 23 2015, 12:18 PM

So the builtins get codegen'ed to the library functions if the backend doesn't support the intrinsics? Seems reasonable.

grosbach accepted this revision.Feb 23 2015, 12:18 PM
grosbach edited edge metadata.
This revision is now accepted and ready to land.Feb 23 2015, 12:18 PM
joerg closed this revision.Mar 5 2015, 6:24 AM
lib/CodeGen/TargetInfo.cpp