Changes in directory llvm/lib/AsmParser:
llvmAsmParser.y updated: 1.240 -> 1.241 --- Log message: allow logical operators on packed integral types --- Diffs of the changes: (+10 -4) llvmAsmParser.y | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.240 llvm/lib/AsmParser/llvmAsmParser.y:1.241 --- llvm/lib/AsmParser/llvmAsmParser.y:1.240 Wed Dec 21 11:53:02 2005 +++ llvm/lib/AsmParser/llvmAsmParser.y Wed Dec 21 12:31:29 2005 @@ -1501,8 +1501,11 @@ | LogicalOps '(' ConstVal ',' ConstVal ')' { if ($3->getType() != $5->getType()) ThrowException("Logical operator types must match!"); - if (!$3->getType()->isIntegral()) - ThrowException("Logical operands must have integral types!"); + if (!$3->getType()->isIntegral()) { + if (!isa<PackedType>($3->getType()) || + !cast<PackedType>($3->getType())->getElementType()->isIntegral()) + ThrowException("Logical operator requires integral operands!"); + } $$ = ConstantExpr::get($1, $3, $5); } | SetCondOps '(' ConstVal ',' ConstVal ')' { @@ -2079,8 +2082,11 @@ delete $2; } | LogicalOps Types ValueRef ',' ValueRef { - if (!(*$2)->isIntegral()) - ThrowException("Logical operator requires integral operands!"); + if (!(*$2)->isIntegral()) { + if (!isa<PackedType>($2->get()) || + !cast<PackedType>($2->get())->getElementType()->isIntegral()) + ThrowException("Logical operator requires integral operands!"); + } $$ = BinaryOperator::create($1, getVal(*$2, $3), getVal(*$2, $5)); if ($$ == 0) ThrowException("binary operator returned null!"); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits