HomePhabricator

[Attributor] H2S fix.

Authored by sstefan1 on Dec 17 2019, 11:41 AM.

Description

[Attributor] H2S fix.

Summary: Fixing issues that were noticed in D71521

Reviewers: jdoerfert, lebedev.ri, uenoku

Subscribers:

Differential Revision: https://reviews.llvm.org/D71564

Details

Committed
sstefan1Dec 17 2019, 11:41 AM
Differential Revision
D71564: [Attributor] H2S fix.
Parents
rGd020e67575d9: [Attributor][NFC] Add test for sle comparison in h2s.
Branches
Unknown
Tags
Unknown

Event Timeline

bondhugula added inline comments.
/llvm/test/Transforms/Attributor/heap_to_stack.ll
328

This won't be turned into an alloca even the way it is now - because this won't overflow with 64-bit signed. You need larger constants here?

sstefan1 marked an inline comment as done.Dec 25 2019, 10:15 AM
sstefan1 added inline comments.
/llvm/test/Transforms/Attributor/heap_to_stack.ll
328

Thanks for noticing!

This was never meant to be turned into alloca. You are right that it won't overflow, though.

On the other hand, this test should not be called test_overflow, because the overflow case will only be hit if the MaxHeapToStackSize is larger than UINT_MAX.
I'll revisit this test in another patch.