[NVPTX] Generate a more optimal sequence for select of i1
authorJustin Holewinski <jholewinski@nvidia.com>
Mon, 26 Jan 2015 19:52:20 +0000 (19:52 +0000)
committerJustin Holewinski <jholewinski@nvidia.com>
Mon, 26 Jan 2015 19:52:20 +0000 (19:52 +0000)
commit33eac3ee5309ee8ac0919e141fe74c9ba76ad92f
treec3e618a681131d4b4596829db1057f560a443310
parent91ccead42a3f84760f2d9794bf8d78c879e9cbb5
[NVPTX] Generate a more optimal sequence for select of i1

Instead of creating a pattern like "(p && a) || ((!p) && b)",
just expand the i8 operands to i32 and perform the selp on them.

Fixes PR22246

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227123 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/NVPTX/NVPTXISelLowering.cpp
lib/Target/NVPTX/NVPTXISelLowering.h
lib/Target/NVPTX/NVPTXInstrInfo.td
test/CodeGen/NVPTX/bug22246.ll [new file with mode: 0644]