From 539b471a33b48654b956a0a4ad0cba777e27b5fc Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Thu, 4 Jan 2007 02:57:22 +0000 Subject: [PATCH] Disallow packed types in icmp/fcmp instructions. The code generator is 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 8a740368398..bc09675898c 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -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((*$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((*$3).get())) + GEN_ERROR("Packed types not supported by fcmp instruction"); Value* tmpVal1 = getVal(*$3, $4); CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6);