Disallow packed types in icmp/fcmp instructions. The code generator is
authorReid Spencer <rspencer@reidspencer.com>
Thu, 4 Jan 2007 02:57:22 +0000 (02:57 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Thu, 4 Jan 2007 02:57:22 +0000 (02:57 +0000)
not prepared to handle them yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32861 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index 8a7403683981dd8b710d487f25a2c1de34a1a680..bc09675898c38e7aca7eb412db10a55c58ea9e90 100644 (file)
@@ -2549,6 +2549,8 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
   | ICMP IPredicates Types ValueRef ',' ValueRef  {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
+    if (isa<PackedType>((*$3).get()))
+      GEN_ERROR("Packed types not supported by icmp instruction");
     Value* tmpVal1 = getVal(*$3, $4);
     CHECK_FOR_ERROR
     Value* tmpVal2 = getVal(*$3, $6);
@@ -2560,6 +2562,8 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
   | FCMP FPredicates Types ValueRef ',' ValueRef  {
     if (!UpRefs.empty())
       GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
+    if (isa<PackedType>((*$3).get()))
+      GEN_ERROR("Packed types not supported by fcmp instruction");
     Value* tmpVal1 = getVal(*$3, $4);
     CHECK_FOR_ERROR
     Value* tmpVal2 = getVal(*$3, $6);