We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b58e77 commit b1caf4dCopy full SHA for b1caf4d
mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
@@ -723,13 +723,15 @@ void mlir::spirv::ConstantOp::getAsmResultNames(
723
IntegerType intTy = llvm::dyn_cast<IntegerType>(type);
724
725
if (IntegerAttr intCst = llvm::dyn_cast<IntegerAttr>(getValue())) {
726
- if (intTy && intTy.getWidth() == 1) {
+ assert(intTy);
727
+
728
+ if (intTy.getWidth() == 1) {
729
return setNameFn(getResult(), (intCst.getInt() ? "true" : "false"));
730
}
731
- if (intTy && intTy.isSignless()) {
732
+ if (intTy.isSignless()) {
733
specialName << intCst.getInt();
- } else if (intTy && intTy.isUnsigned()) {
734
+ } else if (intTy.isUnsigned()) {
735
specialName << intCst.getUInt();
736
} else {
737
specialName << intCst.getSInt();
0 commit comments