[PATCH] D23182: [ConstantFolding] Don't create illegal (non-integral) inttoptrs
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 5 12:02:34 PDT 2016
majnemer accepted this revision.
majnemer added a comment.
This revision is now accepted and ready to land.
LGTM with nits
================
Comment at: lib/Analysis/ConstantFolding.cpp:831
@@ -830,2 +830,3 @@
- if (Ptr->isNullValue() || BasePtr != 0) {
+ PointerType *PTy = cast<PointerType>(Ptr->getType());
+ if ((Ptr->isNullValue() || BasePtr != 0) &&
----------------
`auto *`
================
Comment at: test/Transforms/InstCombine/non-integral-pointers.ll:1
@@ +1,2 @@
+; RUN: opt -instcombine -S < %s | FileCheck %s
+
----------------
Can this be in -instsimplify?
https://reviews.llvm.org/D23182
More information about the llvm-commits
mailing list