From c6f067a8c4046a528c2d2e8bb18fa05a1340c0bb Mon Sep 17 00:00:00 2001 From: Nate Begeman Date: Thu, 20 Oct 2005 02:15:44 +0000 Subject: Move the target constant divide optimization up into the dag combiner, so that the nodes can be folded with other nodes, and we can not duplicate code in every backend. Alpha will probably want this too. llvm-svn: 23835 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp') diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 5256e4839d1..118c605888a 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -27,6 +27,8 @@ PPCTargetLowering::PPCTargetLowering(TargetMachine &TM) // Fold away setcc operations if possible. setSetCCIsExpensive(); + // Fold constant integer div/rem into an alternate sequence of instructions + setIntDivIsExpensive(); // Use _setjmp/_longjmp instead of setjmp/longjmp. setUseUnderscoreSetJmpLongJmp(true); -- cgit v1.2.3