lit: Fix OneCommandPerFileTest format when tests are specified directly.
[oota-llvm.git] / utils / llvm.grm
index 641ba01f20d83fe379c5b7f010d53b1e36b54f5a..fa0dcd1e1520ccddf80d0aeb5d71dfdd6a5179e7 100644 (file)
@@ -53,7 +53,8 @@ FPVAL               ::= ESAPINTVAL ^ "." ^ EUAPINTVAL | "0x" ^ HexDigitSeq ;
 The rest of this file is derived directly from llvmAsmParser.y.
 *)
 
-ArithmeticOps ::= add | sub | mul | udiv | sdiv | fdiv | urem | srem | frem ;
+ArithmeticOps ::= + OptNW add | fadd | OptNW sub | fsub | OptNW mul | fmul |
+                  udiv | OptExact sdiv | fdiv | urem | srem | frem ;
 LogicalOps    ::= shl | lshr | ashr | and | or | xor;
 CastOps       ::= trunc | zext | sext | fptrunc | fpext | bitcast |
                   uitofp | sitofp | fptoui | fptosi | inttoptr | ptrtoint ;
@@ -88,13 +89,12 @@ GVInternalLinkage
  | appending
  | dllexport
  | common
- | "common_odr"
+ | private
  ;
 
 GVExternalLinkage
   ::= dllimport
  | "extern_weak"
- | "extern_weak_odr"
  | + external
  ;
 
@@ -109,7 +109,6 @@ FunctionDeclareLinkage
   ::= + _
  | dllimport
  | "extern_weak"
- | "extern_weak_odr"
  ;
 
 FunctionDefineLinkage
@@ -133,9 +132,7 @@ OptCallingConv ::= + _ |
                  cc EUINT64VAL ;
 
 ParamAttr ::= zeroext
- | zext
  | signext
- | sext
  | inreg
  | sret
  | noalias
@@ -164,6 +161,8 @@ FuncAttr      ::= noreturn
  | signext
  | readnone
  | readonly
+ | inlinehint
+ | alignstack
  | noinline
  | alwaysinline
  | optsize
@@ -236,14 +235,12 @@ ConstVal::= Types "[" ^ ConstVector ^ "]"
  | Types FPVAL ;
 
 ConstExpr::= CastOps "(" ^ ConstVal to Types ^ ")"
- | getelementptr "(" ^ ConstVal IndexList ^ ")"
+ | getelementptr OptInBounds "(" ^ ConstVal IndexList ^ ")"
  | select "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")"
  | ArithmeticOps "(" ^ ConstVal ^ "," ConstVal ^ ")"
  | LogicalOps "(" ^ ConstVal ^ "," ConstVal ^ ")"
  | icmp IPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")"
  | fcmp FPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")"
- | vicmp IPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")"
- | vfcmp FPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")"
  | extractelement "(" ^ ConstVal ^ "," ConstVal ^ ")"
  | insertelement "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")"
  | shufflevector "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")"
@@ -386,8 +383,6 @@ InstVal ::=
  | LogicalOps Types ValueRef ^ "," ValueRef
  | icmp IPredicates Types ValueRef ^ "," ValueRef
  | fcmp FPredicates Types ValueRef ^ "," ValueRef
- | vicmp IPredicates Types ValueRef ^ "," ValueRef
- | vfcmp FPredicates Types ValueRef ^ "," ValueRef
  | CastOps ResolvedVal to Types
  | select ResolvedVal ^ "," ResolvedVal ^ "," ResolvedVal
  | "va_arg" ResolvedVal ^ "," Types
@@ -400,6 +395,11 @@ InstVal ::=
  | MemoryInst ;
 
 OptVolatile ::= - volatile | _ ;
+OptExact ::= - exact | _ ;
+OptNSW ::= - nsw | _ ;
+OptNUW ::= - nuw | _ ;
+OptNW  ::= OptNUW OptNSW | OptNSW OptNUW ;
+OptInBounds  ::= - inbounds | _ ;
 
 MemoryInst ::= malloc Types OptCAlign
  | malloc Types ^ "," INTTYPE ValueRef OptCAlign
@@ -409,6 +409,6 @@ MemoryInst ::= malloc Types OptCAlign
  | OptVolatile load Types ValueRef OptCAlign
  | OptVolatile store ResolvedVal ^ "," Types ValueRef OptCAlign
  | getresult Types ValueRef ^ "," EUINT64VAL
- | getelementptr Types ValueRef IndexList
+ | getelementptr OptInBounds Types ValueRef IndexList
  | extractvalue Types ValueRef ^ ConstantIndexList 
  | insertvalue Types ValueRef ^ "," Types ValueRef ^ ConstantIndexList ;