@@ -46,7 +46,7 @@ namespace Slang
46
46
{
47
47
SINT_MASK = 1 << 0 ,
48
48
FLOAT_MASK = 1 << 1 ,
49
- COMPARISON = 1 << 2 ,
49
+ BOOL_RESULT = 1 << 2 ,
50
50
BOOL_MASK = 1 << 3 ,
51
51
UINT_MASK = 1 << 4 ,
52
52
ASSIGNMENT = 1 << 5 ,
@@ -203,7 +203,7 @@ namespace Slang
203
203
static const OpInfo unaryOps[] = {
204
204
{ kIRPseudoOp_Pos , " +" , ARITHMETIC_MASK },
205
205
{ kIROp_Neg , " -" , ARITHMETIC_MASK },
206
- { kIROp_Not , " !" , ANY_MASK },
206
+ { kIROp_Not , " !" , BOOL_MASK | BOOL_RESULT },
207
207
{ kIROp_BitNot , " ~" , INT_MASK },
208
208
{ kIRPseudoOp_PreInc , " ++" , ARITHMETIC_MASK | ASSIGNMENT },
209
209
{ kIRPseudoOp_PreDec , " --" , ARITHMETIC_MASK | ASSIGNMENT },
@@ -217,19 +217,19 @@ namespace Slang
217
217
{ kIROp_Mul , " *" , ARITHMETIC_MASK },
218
218
{ kIROp_Div , " /" , ARITHMETIC_MASK },
219
219
{ kIROp_Mod , " %" , INT_MASK },
220
- { kIROp_And , " &&" , LOGICAL_MASK },
221
- { kIROp_Or , " ||" , LOGICAL_MASK },
220
+ { kIROp_And , " &&" , BOOL_MASK | BOOL_RESULT },
221
+ { kIROp_Or , " ||" , BOOL_MASK | BOOL_RESULT },
222
222
{ kIROp_BitAnd , " &" , LOGICAL_MASK },
223
223
{ kIROp_BitOr , " |" , LOGICAL_MASK },
224
224
{ kIROp_BitXor , " ^" , LOGICAL_MASK },
225
225
{ kIROp_Lsh , " <<" , INT_MASK },
226
226
{ kIROp_Rsh , " >>" , INT_MASK },
227
- { kIROp_Eql , " ==" , ANY_MASK | COMPARISON },
228
- { kIROp_Neq , " !=" , ANY_MASK | COMPARISON },
229
- { kIROp_Greater , " >" , ARITHMETIC_MASK | COMPARISON },
230
- { kIROp_Less , " <" , ARITHMETIC_MASK | COMPARISON },
231
- { kIROp_Geq , " >=" , ARITHMETIC_MASK | COMPARISON },
232
- { kIROp_Leq , " <=" , ARITHMETIC_MASK | COMPARISON },
227
+ { kIROp_Eql , " ==" , ANY_MASK | BOOL_RESULT },
228
+ { kIROp_Neq , " !=" , ANY_MASK | BOOL_RESULT },
229
+ { kIROp_Greater , " >" , ARITHMETIC_MASK | BOOL_RESULT },
230
+ { kIROp_Less , " <" , ARITHMETIC_MASK | BOOL_RESULT },
231
+ { kIROp_Geq , " >=" , ARITHMETIC_MASK | BOOL_RESULT },
232
+ { kIROp_Leq , " <=" , ARITHMETIC_MASK | BOOL_RESULT },
233
233
{ kIRPseudoOp_AddAssign , " +=" , ASSIGNMENT | ARITHMETIC_MASK },
234
234
{ kIRPseudoOp_SubAssign , " -=" , ASSIGNMENT | ARITHMETIC_MASK },
235
235
{ kIRPseudoOp_MulAssign , " *=" , ASSIGNMENT | ARITHMETIC_MASK },
0 commit comments