llvm/llvm-project

Unnecessary vector type produces wrong ll parser error

Open

#29,043 建立於 2016年7月22日

在 GitHub 查看
 (5 留言) (0 反應) (0 負責人)C++ (10,782 fork)batch import
bugzillagood first issuellvm:core

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

Bugzilla Link 28669
Version trunk
OS Linux
CC @ekatz

Extended Description

This testcase produces a misleading parse error

; RUN: llvm-as < %s
define void @add_v2i16(<2 x i16> addrspace(1)* %out, <2 x i16> %in) {
  %arst = add <2 x i16> %in, <2 x i16> <i16 123, i16 456>
  store <2 x i16> %arst, <2 x i16> addrspace(1)* %out
  ret void
}

expected-type-wrong-error.ll:3:31: error: expected type
  %arst = add <2 x i16> %in, <2 x i16> <i16 123, i16 456>

It is erroring on the 2nd operand <2 x i16> type, it really means the type is unexpected. The correctly parsing version is

  %arst = add <2 x i16> %in, <i16 123, i16 456>

貢獻者指南