This is an archive of the discontinued LLVM Phabricator instance.

[ConstantFolding] Don't create illegal (non-integral) inttoptrs
ClosedPublic

Authored by sanjoy on Aug 4 2016, 4:55 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy updated this revision to Diff 66881.Aug 4 2016, 4:55 PM
sanjoy retitled this revision from to [ConstantFolding] Don't create illegal (non-integral) inttoptrs.
sanjoy updated this object.
sanjoy added reviewers: majnemer, arsenm.
sanjoy added a subscriber: llvm-commits.
majnemer accepted this revision.Aug 5 2016, 12:02 PM
majnemer edited edge metadata.

LGTM with nits

lib/Analysis/ConstantFolding.cpp
831 ↗(On Diff #66881)

auto *

test/Transforms/InstCombine/non-integral-pointers.ll
1 ↗(On Diff #66881)

Can this be in -instsimplify?

This revision is now accepted and ready to land.Aug 5 2016, 12:02 PM
sanjoy added inline comments.Aug 5 2016, 12:26 PM
test/Transforms/InstCombine/non-integral-pointers.ll
1 ↗(On Diff #66881)

-instsimplify for GEPs calls SimplifyGEPInst which does not dispatch into ConstantFoldInstruction.

This revision was automatically updated to reflect the committed changes.