diff --git a/mlir/include/mlir/Support/InterfaceSupport.h b/mlir/include/mlir/Support/InterfaceSupport.h --- a/mlir/include/mlir/Support/InterfaceSupport.h +++ b/mlir/include/mlir/Support/InterfaceSupport.h @@ -193,6 +193,7 @@ std::array, numInterfaces> elements; std::pair *elementIt = elements.data(); + (void)elementIt; (void)std::initializer_list{ 0, (addModelAndUpdateIterator(elementIt), 0)...}; return InterfaceMap(elements); diff --git a/mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp b/mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp --- a/mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp +++ b/mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp @@ -54,12 +54,12 @@ Location loc = copySignOp.getLoc(); int bitwidth = floatType.getWidth(); Type intType = rewriter.getIntegerType(bitwidth); + uint64_t intValue = uint64_t(1) << (bitwidth - 1); Value signMask = rewriter.create( - loc, intType, rewriter.getIntegerAttr(intType, (1u << (bitwidth - 1)))); + loc, intType, rewriter.getIntegerAttr(intType, intValue)); Value valueMask = rewriter.create( - loc, intType, - rewriter.getIntegerAttr(intType, (1u << (bitwidth - 1)) - 1u)); + loc, intType, rewriter.getIntegerAttr(intType, intValue - 1u)); if (auto vectorType = copySignOp.getType().dyn_cast()) { assert(vectorType.getRank() == 1);