Use MaybeAlign when setting alignment
authorJacques Pienaar <jpienaar@google.com>
Mon, 30 Sep 2019 16:36:26 +0000 (09:36 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Mon, 30 Sep 2019 16:37:23 +0000 (09:37 -0700)
PiperOrigin-RevId: 272000548

mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td

index 4b0a073..edb854e 100644 (file)
@@ -249,7 +249,7 @@ def LLVM_AllocaOp :
     if ($alignment.hasValue()) {
       auto align = $alignment.getValue().getZExtValue();
       if (align != 0)
-        alloca->setAlignment(align);
+        alloca->setAlignment(llvm::MaybeAlign(align));
     }
     $res = alloca;
   }];