change the canonical form of "cond ? -1 : 0" to be
authorChris Lattner <sabre@nondot.org>
Sun, 24 Jan 2010 00:09:49 +0000 (00:09 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 24 Jan 2010 00:09:49 +0000 (00:09 +0000)
commitabb992d6a3d2dc05d3f3c62a367ea8977a7dd070
treeb2498eacd1dbdae0230b2b4037063bca999a4ea9
parenteb38ebf15c326a5bb45ca9da6329cdf19ad6df95
change the canonical form of "cond ? -1 : 0" to be
"sext cond" instead of a select.  This simplifies some instcombine
code, matches the policy for zext (cond ? 1 : 0 -> zext), and allows
us to generate better code for a testcase on ppc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94339 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/PatternMatch.h
lib/Target/PowerPC/README.txt
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
lib/Transforms/InstCombine/InstCombineCasts.cpp
lib/Transforms/InstCombine/InstCombineSelect.cpp
test/Transforms/InstCombine/logical-select.ll