AMDGPU: Stop using getSelectCC in division lowering
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 10 Jun 2020 17:01:57 +0000 (13:01 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 10 Jun 2020 17:56:53 +0000 (13:56 -0400)
commit721f8f7530ec3b3f79c3a187fae177178a74c25c
tree6def0bf97696372bb0f0f964e9e73136d62d8e75
parent601b8a0dc9cd43a0a4c8efb90ec8dc5f62b4a882
AMDGPU: Stop using getSelectCC in division lowering

This was promoting booleans to i32 to perform a comparison against
them to feed to a select condition. Just use the booleans
directly. This produces the same final code, since the combiner is
unable to undo the mess this creates. I untangled this logic when I
ported this code to GlobalISel, so port the cleanups back.
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp