summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-05-20 20:25:50 +0000
committerChris Lattner <sabre@nondot.org>2004-05-20 20:25:50 +0000
commit83c139d575f1132a0bff23da6831a0169668b0e8 (patch)
tree0fd25dc51c2f424a3e9544cbb21758886c9d1629 /llvm/lib
parent7b7a14d718c192581d0f0085989f1b20f5d457d1 (diff)
downloadbcm5719-llvm-83c139d575f1132a0bff23da6831a0169668b0e8.tar.gz
bcm5719-llvm-83c139d575f1132a0bff23da6831a0169668b0e8.zip
Fix to make the CBE always emit comparisons inline. Hopefully this will
fix the really bad code we're getting on PPC. llvm-svn: 13609
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/CBackend/Writer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp
index ae3ba809408..6e536f07298 100644
--- a/llvm/lib/Target/CBackend/Writer.cpp
+++ b/llvm/lib/Target/CBackend/Writer.cpp
@@ -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() ||
OpenPOWER on IntegriCloud