AMDGPU: Make f16 ConstantFP legal
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 8 Dec 2016 20:14:46 +0000 (20:14 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 8 Dec 2016 20:14:46 +0000 (20:14 +0000)
commite96d03745d55c18b9afa7f581de06297bf1153b0
tree5e8e8c91da3915e73ab09bbcbce9bab71c66b4e1
parent73b54f413430ec69547b7bf25e2bce7a9ab1d0c9
AMDGPU: Make f16 ConstantFP legal

Not having this legal led to combine failures, resulting
in dumb things like bitcasts of constants not being folded
away.

The only reason I'm leaving the v_mov_b32 hack that f32
already uses is to avoid madak formation test regressions.
PeepholeOptimizer has an ordering issue where the immediate
fold attempt is into the sgpr->vgpr copy instead of the actual
use. Running it twice avoids that problem.

llvm-svn: 289096
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.h
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/test/CodeGen/AMDGPU/br_cc.f16.ll