Closed frej closed 2 years ago
Since we don't have not in MLIR, I could probably generate not X as X == false or X != true.
We have not, it's just not spelled "not", if you want a truth value and not use flow-control you can use xor:
not
func @not_i1(%arg0: i1) -> i1 { %0 = arith.constant 1 : i1 %1 = arith.xori %arg0, %0 : i1 return %1 : i1 }
or you can use select:
func @not_select_i1(%arg0: i1) -> i1 { %0 = arith.constant 0 : i1 %1 = arith.constant 1 : i1 %2 = arith.select %arg0, %0, %1 : i1 return %2 : i1 }
check #396.
We have
not
, it's just not spelled "not", if you want a truth value and not use flow-control you can use xor:or you can use select:
check #396.