[Mlir-commits] [mlir] [mlir][LLVM] Add nsw and nuw flags (PR #74508)
Tobias Gysi
llvmlistbot at llvm.org
Wed Dec 6 05:33:34 PST 2023
================
@@ -0,0 +1,14 @@
+// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
+
+// CHECK-LABEL: define void @intflags_func
+llvm.func @intflags_func(%arg0: i64, %arg1: i64) {
+ // CHECK: %{{.*}} = add nsw i64 %{{.*}}, %{{.*}}
+ %0 = llvm.add %arg0, %arg1 flags <nsw> : i64
----------------
gysit wrote:
Arith does the following for the fastmath flags (`fastmath` `` $fastmath^)?`. I suspect the double ticks remove the space? If you can give it a shot that would be nice otherwise the current solution sounds fine as well.
https://github.com/llvm/llvm-project/pull/74508
More information about the Mlir-commits
mailing list