This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix arm_get_fpscr intrinsic selection in ISel
ClosedPublic

Authored by rs on Mar 6 2017, 4:48 AM.

Details

Summary

Hans found a bug in my patch https://bugs.llvm.org/show_bug.cgi?id=32134 , here was the review https://reviews.llvm.org/D30542 . I didn't check to see if fpscr intrinsic was being selected in ISel.

I've fixed this by changing the node type in the instruction selection from INTRINSIC_WO_CHAIN (no side-effects) to INTRINSIC_W_CHAIN (has side-effects) which makes it semantically correct with the definition of the intrinsic in the tablegen code. Also added a test based on Hans reproducer to make sure instruction selection on int_arm_get_fpscr works.

Diff Detail

Event Timeline

rs created this revision.Mar 6 2017, 4:48 AM
hans resigned from this revision.Mar 6 2017, 11:40 AM
hans added a subscriber: hans.

Sounds good to me. Someone more familiar with ARM should probably sign off on this though.

rengolin accepted this revision.Mar 6 2017, 3:12 PM

Makes sense. LGTM Thanks!

This revision is now accepted and ready to land.Mar 6 2017, 3:12 PM
This revision was automatically updated to reflect the committed changes.