AMDGPU: Look through casted selects to constant fold bin ops
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 21 Jan 2020 00:27:21 +0000 (19:27 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Wed, 22 Jan 2020 15:16:39 +0000 (10:16 -0500)
commit2fe500ab5bb4d50a5ac6ed9600f9900b46e55802
tree73c0699be77f5527237cce3ce55dc53ce38c70cf
parentbcd91778fe7e6fc66cdccc5ddc3ff3fc48909f6b
AMDGPU: Look through casted selects to constant fold bin ops

The promotion of the uniform select to i32 interfered with this fold.
llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fold-binop-select.ll
llvm/test/CodeGen/AMDGPU/dagcombine-select.ll