From: Chris Lattner Date: Mon, 22 Aug 2005 00:47:28 +0000 (+0000) Subject: Make sure expressions only have one use before emitting them into a place that is... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b30ee6a41a00d7fcd45960b3869fc6bcb3f7bdf4;p=oota-llvm.git Make sure expressions only have one use before emitting them into a place that is conditionally executed git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22960 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCISelPattern.cpp b/lib/Target/PowerPC/PPCISelPattern.cpp index d70d0f20edf..51b8927b86f 100644 --- a/lib/Target/PowerPC/PPCISelPattern.cpp +++ b/lib/Target/PowerPC/PPCISelPattern.cpp @@ -1670,9 +1670,10 @@ unsigned ISel::SelectExpr(SDOperand N, bool Recording) { // If the false value is simple enough, evaluate it inline in the false // block. - if (isa(N.getOperand(3)) || - isa(N.getOperand(3)) || - isa(N.getOperand(3))) + if (N.getOperand(3).Val->hasOneUse() && + (isa(N.getOperand(3)) || + isa(N.getOperand(3)) || + isa(N.getOperand(3)))) FalseValue = 0; else FalseValue = SelectExpr(N.getOperand(3));