Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add spv.Undef op to support OpUndef instruction in SPIR-V.
Adding support for OpUndef instruction. Updating the dialect generation script to fix a few bugs in the instruction spec generation. PiperOrigin-RevId: 272975685
- Loading branch information
1 parent
77a809d
commit 3f8bde4
Showing
6 changed files
with
101 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// RUN: mlir-translate -test-spirv-roundtrip %s | FileCheck %s | ||
|
||
spv.module "Logical" "GLSL450" { | ||
func @foo() -> () { | ||
// CHECK: {{%.*}} = spv.Undef : f32 | ||
%0 = spv.Undef : f32 | ||
// CHECK: {{%.*}} = spv.Undef : vector<4xi32> | ||
%1 = spv.Undef : vector<4xi32> | ||
// CHECK: {{%.*}} = spv.Undef : !spv.array<4 x !spv.array<4 x i32>> | ||
%2 = spv.Undef : !spv.array<4x!spv.array<4xi32>> | ||
// CHECK: {{%.*}} = spv.Undef : !spv.ptr<!spv.struct<f32>, StorageBuffer> | ||
%3 = spv.Undef : !spv.ptr<!spv.struct<f32>, StorageBuffer> | ||
spv.Return | ||
} | ||
} |
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