This is an archive of the discontinued LLVM Phabricator instance.

[SCCP] Support NUW/NSW inference for all overflowing binary operators.
ClosedPublic

Authored by fhahn on Jan 27 2023, 6:42 AM.

Details

Summary

Extend the NUW/NSW inference logic add in 72121a20cd and cdeaf5f28c3dc
to all overflowing binary operators.

Diff Detail

Event Timeline

fhahn created this revision.Jan 27 2023, 6:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2023, 6:42 AM
fhahn requested review of this revision.Jan 27 2023, 6:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2023, 6:42 AM
nikic accepted this revision.Jan 27 2023, 6:44 AM

LGTM

This revision is now accepted and ready to land.Jan 27 2023, 6:44 AM
This revision was landed with ongoing or failed builds.Jan 28 2023, 9:42 AM
This revision was automatically updated to reflect the committed changes.

This commit is causing a segfault when building python 3.11.3 on ppc64le. I'm still working on gathering more info.

This commit is causing a segfault when building python 3.11.3 on ppc64le. I'm still working on gathering more info.

I've tracked this down to the C function that is miscompiled/buggy. What kind of dumps can I provide that would be the most useful for debugging?

nikic added a comment.Apr 25 2023, 1:29 AM

This commit is causing a segfault when building python 3.11.3 on ppc64le. I'm still working on gathering more info.

I've tracked this down to the C function that is miscompiled/buggy. What kind of dumps can I provide that would be the most useful for debugging?

The input IR (-S -emit-llvm -Xclang -disable-llvm-optzns) would probably be enough. Which one is the problematic function?

Just to double check, did you test this with the final version of these changes? They were reverted and later reapplied, so a bisect might have hit a bad intermediate revision.

fhahn added a comment.Apr 25 2023, 4:55 AM

This commit is causing a segfault when building python 3.11.3 on ppc64le. I'm still working on gathering more info.

I've tracked this down to the C function that is miscompiled/buggy. What kind of dumps can I provide that would be the most useful for debugging?

The input IR (-S -emit-llvm -Xclang -disable-llvm-optzns) would probably be enough. Which one is the problematic function?

That would be helpful or the full module IR before IPSCCP/SCCP run on the function.

I've filed an issue here with the LLVM IR dump: https://github.com/llvm/llvm-project/issues/62379