NewGVN: Handle addrspacecast
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 5 Jun 2019 21:15:52 +0000 (21:15 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 5 Jun 2019 21:15:52 +0000 (21:15 +0000)
commit663d762c9a5344c9209d1180e823fe22b26c433f
tree3b6015944d70fcbf8db4178252a878cd890e662c
parentc46827c7eda30cd0bc3e70d08670c8dc39fe6166
NewGVN: Handle addrspacecast

The AllConstant check needs to be moved out of the if/else if chain to
avoid a test regression. The "there is no SimplifyZExt" comment
puzzles me, since there is SimplifyCastInst. Additionally, the
Simplify* calls seem to not see the operand as constant, so this needs
to be tried if the simplify failed.

llvm-svn: 362653
llvm/lib/Transforms/Scalar/NewGVN.cpp
llvm/test/Transforms/NewGVN/addrspacecast.ll [new file with mode: 0644]