Add target hook to prevent folding some bitcasted loads.
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 15 Nov 2013 04:42:23 +0000 (04:42 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 15 Nov 2013 04:42:23 +0000 (04:42 +0000)
commit509a492442b7e889d615d3b451629c81a810aef1
treed4facf4559ba4d9a84d7792f6e697ea2a7909d2d
parenta0846f414366462d24e65b48deea6b2b85f6616b
Add target hook to prevent folding some bitcasted loads.

This is to avoid this transformation in some cases:
fold (conv (load x)) -> (load (conv*)x)

On architectures that don't natively support some vector
loads efficiently casting the load to a smaller vector of
larger types and loading is more efficient.

Patch by Micah Villmow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194783 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/R600/AMDGPUISelLowering.cpp
lib/Target/R600/AMDGPUISelLowering.h
test/CodeGen/R600/combine_vloads.ll [new file with mode: 0644]