AMDGPU: Move permlane discard vdst_in optimization
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 16 Jan 2020 03:25:58 +0000 (22:25 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Thu, 16 Jan 2020 22:27:53 +0000 (17:27 -0500)
commit91e758b7329b4ff134684e661af93a85c436a460
treed2c73acf952ea5694a4535f6c7bb6ea4cea5697d
parentfa4112fffc6bd81ba44a9e6ffb19f4314f6e37b0
AMDGPU: Move permlane discard vdst_in optimization

This case can be handled as a regular selection pattern, so move it
out of the weird post-isel folding code which doesn't have an exactly
equivalent place in GlobalISel.

I think it doesn't make much sense to do this optimization here
though, and it would be more useful in instcombine. There's not really
any new information that will be gained during lowering since these
inputs were known from the beginning.
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/VOP3Instructions.td