Skip to content

Commit 82620d3

Browse files
committed
[SelectionDAG] Fix misplaced commas in operand bundle errors
1 parent a102342 commit 82620d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,9 +846,9 @@ static void failForInvalidBundles(const CallBase &I, StringRef Name,
846846
ArrayRef<uint32_t> AllowedBundles) {
847847
if (I.hasOperandBundlesOtherThan(AllowedBundles)) {
848848
std::string Error;
849+
bool First = true;
849850
for (unsigned i = 0, e = I.getNumOperandBundles(); i != e; ++i) {
850851
OperandBundleUse U = I.getOperandBundleAt(i);
851-
bool First = true;
852852
if (is_contained(AllowedBundles, U.getTagID()))
853853
continue;
854854
if (!First)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
; RUN: not llc -mtriple=x86_64-unknown-linux-gnu < %s 2>&1 | FileCheck %s
22

3-
; CHECK: LLVM ERROR: cannot lower calls with arbitrary operand bundles: foo
3+
; CHECK: LLVM ERROR: cannot lower calls with arbitrary operand bundles: foo, bar
44

55
declare void @g()
66

77
define void @f(i32 %arg) {
8-
call void @g() [ "foo"(i32 %arg) ]
8+
call void @g() [ "foo"(i32 %arg), "bar"(i32 %arg) ]
99
ret void
1010
}

0 commit comments

Comments
 (0)