DAGCombiner: Turn truncate of a bitcasted vector to an extract
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 1 Mar 2016 21:31:53 +0000 (21:31 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 1 Mar 2016 21:31:53 +0000 (21:31 +0000)
commitb36d462fac8a236b328b00abf053774ff7cd376a
tree993d54a1627f935afd53ce297ed34bcf2c4ab688
parent889e45601e0953393dbe852df06b9d1fa097425a
DAGCombiner: Turn truncate of a bitcasted vector to an extract

On AMDGPU where operations i64 operations are often bitcasted to v2i32
and back, this pattern shows up regularly where it breaks some
expected combines on i64, such as load width reducing.

This fixes some test failures in a future commit when i64 loads
are changed to promote.

llvm-svn: 262397
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AMDGPU/half.ll
llvm/test/CodeGen/AMDGPU/trunc-bitcast-vector.ll [new file with mode: 0644]