[Mlir-commits] [mlir] [MLIR][Arith] SelectOp fix invalid folding (PR #117555)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Nov 26 04:16:25 PST 2024
================
@@ -2314,7 +2314,8 @@ OpFoldResult arith::SelectOp::fold(FoldAdaptor adaptor) {
return trueVal;
// select %x, true, false => %x
- if (getType().isInteger(1) && matchPattern(adaptor.getTrueValue(), m_One()) &&
+ if (getType().isSignlessInteger(1) &&
+ matchPattern(adaptor.getTrueValue(), m_One()) &&
matchPattern(adaptor.getFalseValue(), m_Zero()))
return condition;
----------------
7FM wrote:
Since I am not familiar with the Arith + vector use case, I would prefer a separate PR for this.
https://github.com/llvm/llvm-project/pull/117555
More information about the Mlir-commits
mailing list