AMDGPU: Apply i16 add->sub pattern with zext to i32
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 7 Jan 2020 18:32:03 +0000 (13:32 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Tue, 7 Jan 2020 21:36:31 +0000 (16:36 -0500)
commit4844bf0fe2c83859cde322a2f952ac8337bdff05
treec7d3442f81254a5b13ffc731286f86eb8ef55a95
parent73d93617d3ae23bad232fa3a160c638728c71c01
AMDGPU: Apply i16 add->sub pattern with zext to i32

This was only applying the deeper nested zext pattern, and missing the
special case code size fold.
llvm/lib/Target/AMDGPU/VOP2Instructions.td
llvm/test/CodeGen/AMDGPU/shrink-add-sub-constant.ll
llvm/test/CodeGen/AMDGPU/sub.v2i16.ll