mhlo.xor folding bug when lhs == rhs
benvanik opened this issue · 2 comments
benvanik commented
(cc @rsuderman)
Looks like the way the 0 value is being created here is wrong:
Repro:
func @bools_rgn_dispatch_0(%arg0: tensor<4xi1>) -> tensor<4xi1> {
%0 = mhlo.xor %arg0, %arg0: tensor<4xi1>
return %0 : tensor<4xi1>
}
Results in this assert:
Assertion failed: ::isValidIntOrFloat(type.getElementType(), dataEltSize, isInt, isSigned), file D:\Dev\iree\third_party\llvm-project\mlir\lib\IR\Attributes.cpp, line 1114
Should be using builder.getZeroAttr(rType)
instead.
rsuderman commented
Fixed shortly after bug logged. Closing due to fix over a year ago.