Fix to make the CBE always emit comparisons inline. Hopefully this will

fix the really bad code we're getting on PPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13609 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-05-20 20:25:50 +00:00
parent ceabd97423
commit 433e25a920
2 changed files with 8 additions and 0 deletions

View File

@ -126,6 +126,10 @@ namespace {
// printed and an extra copy of the expr is not emitted.
//
static bool isInlinableInst(const Instruction &I) {
// Always inline setcc instructions, even if they are shared by multiple
// expressions. GCC generates horrible code if we don't.
if (isa<SetCondInst>(I)) return true;
// Must be an expression, must be used exactly once. If it is dead, we
// emit it inline where it would go.
if (I.getType() == Type::VoidTy || !I.hasOneUse() ||

View File

@ -126,6 +126,10 @@ namespace {
// printed and an extra copy of the expr is not emitted.
//
static bool isInlinableInst(const Instruction &I) {
// Always inline setcc instructions, even if they are shared by multiple
// expressions. GCC generates horrible code if we don't.
if (isa<SetCondInst>(I)) return true;
// Must be an expression, must be used exactly once. If it is dead, we
// emit it inline where it would go.
if (I.getType() == Type::VoidTy || !I.hasOneUse() ||