Avoids merge errors when opaque pointers are loaded into different types.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Scalar/GVNHoist.cpp | ||
---|---|---|
192 | I'm not sure this is true for pointers in different address spaces. |
llvm/lib/Transforms/Scalar/GVNHoist.cpp | ||
---|---|---|
192 | You're right about that... if we key off the whole type as suggested above, it will fix this problem too. |
Widen 2nd element of key to uintptr_t, store entire Type*. Add test for different addrspaces, use update_test_checks.
One minor change, but otherwise LGTM
llvm/lib/Transforms/Scalar/GVNHoist.cpp | ||
---|---|---|
162 | You'll want to transpose the ~ and the (uintptr_t) here. |
GVN hoist did not have the logic for opaque pointers because opaque pointers were added later IIRC.
Thanks for fixing this!
LGTM.
You'll want to transpose the ~ and the (uintptr_t) here.