[PATCH] D76246: [mlir][spirv] Consolidate std.constant to spv.constant conversions
Mahesh Ravishankar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 17 09:38:13 PDT 2020
mravishankar requested changes to this revision.
mravishankar added inline comments.
This revision now requires changes to proceed.
================
Comment at: mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp:53
+ // want to change the bitwidth. Emit a message at least.
+ if (srcAttr.getValue().isSignedIntN(dstType.getWidth())) {
+ auto dstAttr = builder.getIntegerAttr(dstType, srcAttr.getInt());
----------------
+1 for this is dangerous!
================
Comment at: mlir/test/Conversion/StandardToSPIRV/std-to-spirv.mlir:308
+func @constant_16bit() {
+ // CHECK: spv.constant 4 : i16
+ %0 = constant 4 : i16
----------------
How come these didnt become i32. I thought there is a vulkan extension needed for that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76246/new/
https://reviews.llvm.org/D76246
More information about the llvm-commits
mailing list