[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu May 20 15:27:02 PDT 2004
Changes in directory llvm/lib/Target/CBackend:
Writer.cpp updated: 1.174 -> 1.175
---
Log message:
Fix to make the CBE always emit comparisons inline. Hopefully this will
fix the really bad code we're getting on PPC.
---
Diffs of the changes: (+4 -0)
Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.174 llvm/lib/Target/CBackend/Writer.cpp:1.175
--- llvm/lib/Target/CBackend/Writer.cpp:1.174 Sun May 9 15:41:32 2004
+++ llvm/lib/Target/CBackend/Writer.cpp Thu May 20 15:25:50 2004
@@ -126,6 +126,10 @@
// 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() ||
More information about the llvm-commits
mailing list