This is an archive of the discontinued LLVM Phabricator instance.

[m68k] Fix incorrect handling of TLS when matching addressing mode.
ClosedPublic

Authored by 0x59616e on Jun 15 2023, 11:28 PM.

Details

Summary

TargetGlobalTLSAddress is not considered and handled correctly when matching addressing mode, which leads to an incorrect result of instruction selection.

fixes #63162.

Diff Detail

Event Timeline

0x59616e created this revision.Jun 15 2023, 11:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 11:28 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
0x59616e requested review of this revision.Jun 15 2023, 11:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 11:28 PM
RKSimon added inline comments.Jun 16 2023, 2:47 AM
llvm/lib/Target/M68k/M68kISelDAGToDAG.cpp
747–748

drop this?

I can confirm that this patch fixes the issue for me!

myhsu added a comment.Jun 19 2023, 1:02 PM

Overall looks good. Though please address the inline comments.

llvm/lib/Target/M68k/M68kISelDAGToDAG.cpp
504

please add curly braces around this case

0x59616e updated this revision to Diff 533442.Jun 21 2023, 5:47 PM

address feedbacks

0x59616e marked 2 inline comments as done.Jun 21 2023, 5:48 PM
myhsu accepted this revision.Jun 22 2023, 9:31 AM

Cool, LGTM
Thanks!

This revision is now accepted and ready to land.Jun 22 2023, 9:31 AM