]> granicus.if.org Git - llvm/commit
[GVN] Don't coerce non-integral pointers to integers or vice versa
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 19 Apr 2017 18:21:09 +0000 (18:21 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 19 Apr 2017 18:21:09 +0000 (18:21 +0000)
commit980a21c3065fc109cec5958f09b7655f6857bc1f
tree2ca1ec4276d30201572ef79e77942877b39a7d3a
parenteab85946c15a4b71583e0d95ed40fc3471679c93
[GVN] Don't coerce non-integral pointers to integers or vice versa

Summary:
See http://llvm.org/docs/LangRef.html#non-integral-pointer-type

The NewGVN test does not fail without these changes (perhaps it does
try to coerce pointers <-> integers to begin with?), but I added the
test case anyway.

Reviewers: dberlin

Subscribers: mcrosier, llvm-commits, Prazek

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300730 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/VNCoercion.cpp
test/Transforms/GVN/non-integral-pointers.ll [new file with mode: 0644]
test/Transforms/NewGVN/non-integral-pointers.ll [new file with mode: 0644]