llvm-6502/test/Transforms/MergeFunc
Stepan Dyatkovskiy dff57f19a1 PR17925 bugfix.
Short description.

This issue is about case of treating pointers as integers.
We treat pointers as different if they references different address space.
At the same time, we treat pointers equal to integers (with machine address
width). It was a point of false-positive. Consider next case on 32bit machine:

void foo0(i32 addrespace(1)* %p)
void foo1(i32 addrespace(2)* %p)
void foo2(i32 %p)

foo0 != foo1, while
foo1 == foo2 and foo0 == foo2.

As you can see it breaks transitivity. That means that result depends on order
of how functions are presented in module. Next order causes merging of foo0
and foo1: foo2, foo0, foo1
First foo0 will be merged with foo2, foo0 will be erased. Second foo1 will be
merged with foo2.
Depending on order, things could be merged we don't expect to.

The fix:
Forbid to treat any pointer as integer, except for those, who belong to address space 0.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195769 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-26 16:11:03 +00:00
..
2011-02-08-RemoveEqual.ll
2013-01-10-MergeFuncAssert.ll CastInst::castIsValid should return true if the dest type is the same as 2013-01-10 23:22:53 +00:00
address-spaces.ll Teach MergeFunctions about address spaces 2013-11-10 01:44:37 +00:00
crash.ll We are not able to bitcast a pointer to an integral value. 2013-04-15 22:33:50 +00:00
fold-weak.ll
inttoptr-address-space.ll Teach MergeFunctions about address spaces 2013-11-10 01:44:37 +00:00
inttoptr.ll Add missing CHECK-LABEL 2013-09-14 02:44:06 +00:00
merge-ptr-and-int.ll Don't merge tiny functions. 2013-10-01 18:05:30 +00:00
phi-speculation1.ll Revert the test moves from 176733. Use "REQUIRES: asserts" instead. 2013-03-12 16:27:52 +00:00
phi-speculation2.ll Revert the test moves from 176733. Use "REQUIRES: asserts" instead. 2013-03-12 16:27:52 +00:00
ptr-int-transitivity-1.ll PR17925 bugfix. 2013-11-26 16:11:03 +00:00
ptr-int-transitivity-2.ll PR17925 bugfix. 2013-11-26 16:11:03 +00:00
ptr-int-transitivity-3.ll PR17925 bugfix. 2013-11-26 16:11:03 +00:00
too-small.ll Don't merge tiny functions. 2013-10-01 18:05:30 +00:00
vector.ll TBAA: remove !tbaa from testing cases if not used. 2013-04-30 17:52:57 +00:00
vectors-and-arrays.ll Revert the test moves from 176733. Use "REQUIRES: asserts" instead. 2013-03-12 16:27:52 +00:00