This is an archive of the discontinued LLVM Phabricator instance.

Make switch-to-lookup-large-types.ll more reliable
ClosedPublic

Authored by arichardson on Jan 5 2023, 7:16 AM.

Details

Summary

When larger integer types are natively supported simplifycfg will use an
inline constant instead of a global variable for this transform. I noticed
this while trying to automatically infer the datalayout from the target
triple in opt if it is not explicitly specified. Since the x86_64
datalayout includes "n8:16:32:64", this test started failing.

While touching this file also change i128 to i64 in the first test since
I believe this was intended behaviour in the original commit.

Diff Detail

Event Timeline

arichardson created this revision.Jan 5 2023, 7:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2023, 7:16 AM
Herald added a subscriber: pengfei. · View Herald Transcript
arichardson requested review of this revision.Jan 5 2023, 7:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2023, 7:16 AM
spatel accepted this revision.Jan 5 2023, 10:56 AM

LGTM

This revision is now accepted and ready to land.Jan 5 2023, 10:56 AM
nikic added a subscriber: nikic.Jan 5 2023, 10:59 AM
nikic added inline comments.
llvm/test/Transforms/SimplifyCFG/X86/switch-to-lookup-large-types.ll
1

--force-update shouldn't be here.

fhahn accepted this revision.Jan 5 2023, 11:25 AM

LGTM, thanks!

llvm/test/Transforms/SimplifyCFG/X86/switch-to-lookup-large-types.ll
11

Yeah that was the original intention here IIRC, thanks for fixing this.

arichardson added inline comments.Jan 5 2023, 12:56 PM
llvm/test/Transforms/SimplifyCFG/X86/switch-to-lookup-large-types.ll
1

Good catch. I should probably submit a review for the update scripts to not include this flag.

arichardson added inline comments.Jan 6 2023, 5:06 AM
llvm/test/Transforms/SimplifyCFG/X86/switch-to-lookup-large-types.ll
1

Submitted D141124

This revision was landed with ongoing or failed builds.Jan 6 2023, 5:35 AM
This revision was automatically updated to reflect the committed changes.