-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IR/Verifier: Allow vector type in atomic load and store
Vector types on atomics are assumed to be invalid by the verifier. However, this type can be valid if it is lowered by codegen. commit-id:72529270
- Loading branch information
Showing
4 changed files
with
29 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s | ||
; CHECK: atomic store operand must have integer, pointer, floating point, or vector type! | ||
; CHECK: atomic load operand must have integer, pointer, floating point, or vector type! | ||
|
||
; CHECK: atomic store operand must have integer, pointer, or floating point type! | ||
; CHECK: atomic load operand must have integer, pointer, or floating point type! | ||
%ty = type { i32 }; | ||
|
||
define void @foo(ptr %P, <1 x i64> %v) { | ||
store atomic <1 x i64> %v, ptr %P unordered, align 8 | ||
define void @foo(ptr %P, %ty %v) { | ||
store atomic %ty %v, ptr %P unordered, align 8 | ||
ret void | ||
} | ||
|
||
define <1 x i64> @bar(ptr %P) { | ||
%v = load atomic <1 x i64>, ptr %P unordered, align 8 | ||
ret <1 x i64> %v | ||
define %ty @bar(ptr %P) { | ||
%v = load atomic %ty, ptr %P unordered, align 8 | ||
ret %ty %v | ||
} |