[PATCH] D29076: [X86][SSE] Add explicit braces to avoid -Wdangling-else warning.
Martin Böhme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 04:37:34 PST 2017
mboehme created this revision.
Herald added a subscriber: igorb.
https://reviews.llvm.org/D29076
Files:
lib/Target/X86/X86ISelLowering.cpp
Index: lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- lib/Target/X86/X86ISelLowering.cpp
+++ lib/Target/X86/X86ISelLowering.cpp
@@ -30478,11 +30478,12 @@
// Out of range logical bit shifts are guaranteed to be zero.
// Out of range arithmetic bit shifts splat the sign bit.
APInt ShiftVal = cast<ConstantSDNode>(N->getOperand(1))->getAPIntValue();
- if (ShiftVal.zextOrTrunc(8).uge(NumBitsPerElt))
+ if (ShiftVal.zextOrTrunc(8).uge(NumBitsPerElt)) {
if (LogicalShift)
return getZeroVector(VT.getSimpleVT(), Subtarget, DAG, SDLoc(N));
else
ShiftVal = NumBitsPerElt - 1;
+ }
SDValue N0 = N->getOperand(0);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29076.85564.patch
Type: text/x-patch
Size: 707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170124/d090dc05/attachment.bin>
More information about the llvm-commits
mailing list