[llvm-commits] [llvm] r91853 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Daniel Dunbar
daniel at zuster.org
Mon Dec 21 15:27:58 PST 2009
Author: ddunbar
Date: Mon Dec 21 17:27:57 2009
New Revision: 91853
URL: http://llvm.org/viewvc/llvm-project?rev=91853&view=rev
Log:
Add suggested parentheses.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=91853&r1=91852&r2=91853&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon Dec 21 17:27:57 2009
@@ -9598,10 +9598,10 @@
// MAX(MIN(a, b), a) -> a
// MIN(MAX(a, b), a) -> a
- if (SPF1 == SPF_SMIN && SPF2 == SPF_SMAX ||
- SPF1 == SPF_SMAX && SPF2 == SPF_SMIN ||
- SPF1 == SPF_UMIN && SPF2 == SPF_UMAX ||
- SPF1 == SPF_UMAX && SPF2 == SPF_UMIN)
+ if ((SPF1 == SPF_SMIN && SPF2 == SPF_SMAX) ||
+ (SPF1 == SPF_SMAX && SPF2 == SPF_SMIN) ||
+ (SPF1 == SPF_UMIN && SPF2 == SPF_UMAX) ||
+ (SPF1 == SPF_UMAX && SPF2 == SPF_UMIN))
return ReplaceInstUsesWith(Outer, C);
}
More information about the llvm-commits
mailing list