AMDGPU: Change boolean content type to 0 or 1
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 11 Nov 2019 09:16:38 +0000 (14:46 +0530)
committerMatt Arsenault <arsenm2@gmail.com>
Fri, 15 Nov 2019 08:13:47 +0000 (13:43 +0530)
commit31479d868e2ace47021324c387d0460cfa737296
tree1f07e07147010aafd075c250dfc57bd55a468c56
parent69fcfb7d3597e0cdb5554b4e672e9032b411b167
AMDGPU: Change boolean content type to 0 or 1

The usage of target boolean checks is overly inflexible, since sext
and zext of a compare are equally cheap. The choice is arbitrary, but
using 0/1 to some degree is the choice of lower resistance since
that's what most targets use. This enables a few combines that don't
bother to support ZeroOrNegativeOneBooleanContent.
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.if.break.i32.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.if.break.i64.ll
llvm/test/CodeGen/AMDGPU/amdgcn.private-memory.ll
llvm/test/CodeGen/AMDGPU/combine-cond-add-sub.ll
llvm/test/CodeGen/AMDGPU/extract_vector_dynelt.ll