[InstSimplify] Push commuted op checks for and/or of icmp further down to avoid dupli...
authorCraig Topper <craig.topper@gmail.com>
Fri, 26 May 2017 22:42:34 +0000 (22:42 +0000)
committerCraig Topper <craig.topper@gmail.com>
Fri, 26 May 2017 22:42:34 +0000 (22:42 +0000)
commit348314dfb87a1265ef84658acf023d7999212be5
tree66b4d3d0c5956f238eb38e8f1f3eca695d79f98a
parent3c585d3a8f196c28284975c718f4e13921ee3fc9
[InstSimplify] Push commuted op checks for and/or of icmp further down to avoid duplicate work

Previously, we called simplifyPossiblyCastedAndOrOfICmps twice with the operands commuted, but the call to simplifyAndOrOfICmpsWithConstants further down already handles commuting and doesn't need to be called both ways.

This patch pushes double calls further down to just the individual routines that need to be called twice.

Differential Revision: https://reviews.llvm.org/D33603

llvm-svn: 304044
llvm/lib/Analysis/InstructionSimplify.cpp