Introduce new convenience methods for sign extending or
authorDuncan Sands <baldrick@free.fr>
Tue, 13 Oct 2009 21:04:12 +0000 (21:04 +0000)
committerDuncan Sands <baldrick@free.fr>
Tue, 13 Oct 2009 21:04:12 +0000 (21:04 +0000)
commit3a66a68b0cc81193abfc074b1d360a4950151d38
treece5aaed17ab826e9245fcbe8bd389b21467b7063
parentb408b15fa423d4c3c1d4840ff6378af17f6f293b
Introduce new convenience methods for sign extending or
truncating an SDValue (depending on whether the target
type is bigger or smaller than the value's type); or zero
extending or truncating it.  Use it in a few places (this
seems to be a popular operation, but I only modified cases
of it in SelectionDAGBuild).  In particular, the eh_selector
lowering was doing this wrong due to a repeated rather than
inverted test, fixed with this change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84027 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp