parent
b22f2f0eea
commit
6eefb07767
|
@ -1362,7 +1362,8 @@ OpFoldResult OrOp::fold(ArrayRef<Attribute> operands) {
|
||||||
OpFoldResult XorOp::fold(ArrayRef<Attribute> operands) {
|
OpFoldResult XorOp::fold(ArrayRef<Attribute> operands) {
|
||||||
auto rType = getType().cast<ShapedType>();
|
auto rType = getType().cast<ShapedType>();
|
||||||
if (lhs() == rhs()) {
|
if (lhs() == rhs()) {
|
||||||
return DenseIntElementsAttr::get(rType, 0);
|
Builder builder(getContext());
|
||||||
|
return builder.getZeroAttr(rType);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto lhsVal = operands[0].dyn_cast_or_null<DenseElementsAttr>();
|
auto lhsVal = operands[0].dyn_cast_or_null<DenseElementsAttr>();
|
||||||
|
|
Loading…
Reference in New Issue