@@ -97,15 +97,6 @@ predicate compareFunctionWithValue(Expr guardExp, Function compArg, Expr valArg)
97
97
or
98
98
gc .ensuresLt ( valArg , globalValueNumber ( compArg .getACallToThisFunction ( ) ) .getAnExpr ( ) , 0 ,
99
99
guardExp .getBasicBlock ( ) , false )
100
- or
101
- if valArg .getValue ( ) .toFloat ( ) = 0
102
- then
103
- exists ( NotExpr ne , IfStmt ifne |
104
- ne .getOperand ( ) = globalValueNumber ( compArg .getACallToThisFunction ( ) ) .getAnExpr ( ) and
105
- ifne .getCondition ( ) = ne and
106
- ifne .getThen ( ) .getAChild * ( ) = guardExp
107
- )
108
- else none ( )
109
100
)
110
101
or
111
102
exists ( Expr exp |
@@ -118,6 +109,13 @@ predicate compareFunctionWithValue(Expr guardExp, Function compArg, Expr valArg)
118
109
guardExp .getBasicBlock ( ) , true )
119
110
)
120
111
)
112
+ or
113
+ valArg .getValue ( ) .toFloat ( ) = 0 and
114
+ exists ( NotExpr ne , IfStmt ifne |
115
+ ne .getOperand ( ) = globalValueNumber ( compArg .getACallToThisFunction ( ) ) .getAnExpr ( ) and
116
+ ifne .getCondition ( ) = ne and
117
+ ifne .getThen ( ) .getAChild * ( ) = guardExp
118
+ )
121
119
}
122
120
123
121
/** Wraping predicate for call `compareFunctionWithValue`. */
@@ -148,15 +146,6 @@ predicate compareExprWithValue(Expr guardExp, Expr compArg, Expr valArg) {
148
146
or
149
147
gc .ensuresLt ( valArg , globalValueNumber ( compArg ) .getAnExpr ( ) , 0 , guardExp .getBasicBlock ( ) ,
150
148
false )
151
- or
152
- if valArg .getValue ( ) .toFloat ( ) = 0
153
- then
154
- exists ( NotExpr ne , IfStmt ifne |
155
- ne .getOperand ( ) = globalValueNumber ( compArg ) .getAnExpr ( ) and
156
- ifne .getCondition ( ) = ne and
157
- ifne .getThen ( ) .getAChild * ( ) = guardExp
158
- )
159
- else none ( )
160
149
)
161
150
or
162
151
exists ( Expr exp |
@@ -167,6 +156,13 @@ predicate compareExprWithValue(Expr guardExp, Expr compArg, Expr valArg) {
167
156
gc .ensuresLt ( exp , globalValueNumber ( compArg ) .getAnExpr ( ) , 0 , guardExp .getBasicBlock ( ) , true )
168
157
)
169
158
)
159
+ or
160
+ valArg .getValue ( ) .toFloat ( ) = 0 and
161
+ exists ( NotExpr ne , IfStmt ifne |
162
+ ne .getOperand ( ) = globalValueNumber ( compArg ) .getAnExpr ( ) and
163
+ ifne .getCondition ( ) = ne and
164
+ ifne .getThen ( ) .getAChild * ( ) = guardExp
165
+ )
170
166
}
171
167
172
168
/** Wraping predicate for call `compareExprWithValue`. */
0 commit comments