From bfdfea86a1489b7249e52f67fe91a0bf028148a9 Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Fri, 1 Jan 2010 04:41:36 +0000 Subject: [PATCH] Fix a warning on gcc 4.4. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit SelectionDAGBuilder.cpp:4294: warning: suggest explicit braces to avoid ambiguous ‘else’ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92395 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index ee2012ef57c..74d624f3647 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -4295,11 +4295,12 @@ static SDValue ExpandPowI(DebugLoc DL, SDValue LHS, SDValue RHS, SDValue Res; // Logically starts equal to 1.0 SDValue CurSquare = LHS; while (Val) { - if (Val & 1) + if (Val & 1) { if (Res.getNode()) Res = DAG.getNode(ISD::FMUL, DL,Res.getValueType(), Res, CurSquare); else Res = CurSquare; // 1.0*CurSquare. + } CurSquare = DAG.getNode(ISD::FMUL, DL, CurSquare.getValueType(), CurSquare, CurSquare); -- 2.34.1