<dt><tt>!null(a)</tt></dt>
<dd>An integer {0,1} indicating whether list 'a' is empty.</dd>
<dt><tt>!if(a,b,c)</tt></dt>
- <dd>'b' if the result of integer operator 'a' is nonzero, 'c' otherwise.</dd>
+ <dd>'b' if the result of 'int' or 'bit' operator 'a' is nonzero,
+ 'c' otherwise.</dd>
<dt><tt>!eq(a,b)</tt></dt>
<dd>Integer one if string a is equal to string b, zero otherwise. This
only operates on string, int and bit objects. Use !cast<string> to
}
case IF: {
- IntInit *LHSi = dynamic_cast<IntInit*>(LHS);
+ IntInit *LHSi =
+ dynamic_cast<IntInit*>(LHS->convertInitializerTo(new IntRecTy()));
if (LHSi) {
if (LHSi->getValue()) {
return MHS;
Init *lhs = LHS->resolveReferences(R, RV);
if (Opc == IF && lhs != LHS) {
- IntInit *Value = dynamic_cast<IntInit*>(lhs);
+ IntInit *Value =
+ dynamic_cast<IntInit*>(LHS->convertInitializerTo(new IntRecTy()));
if (Value != 0) {
// Short-circuit
if (Value->getValue()) {