[Mlir-commits] [mlir] [mlir][x86] Decouple Accumulator from ADD-Based Vector Contractions (over loops) (PR #204327)
Julian Oppermann
llvmlistbot at llvm.org
Thu Jul 23 02:03:53 PDT 2026
================
@@ -155,9 +174,21 @@ Operation *traceToVectorReadLikeParentOperation(Value v) {
while (true) {
// Case 1: Value defined by an operation
if (Operation *defOp = v.getDefiningOp()) {
- if (isa<vector::TransferReadOp, vector::LoadOp>(defOp))
+ if (isa<vector::TransferReadOp, vector::LoadOp, arith::ConstantOp>(defOp))
return defOp;
+ if (isa<arith::ConstantOp>(defOp)) {
+ Attribute value = (dyn_cast<arith::ConstantOp>(defOp)).getValue();
+
+ if ((dyn_cast<IntegerAttr>(value)).getValue().isZero())
+ return defOp;
+
+ if ((dyn_cast<FloatAttr>(value)).getValue().isZero())
+ return defOp;
----------------
jopperm wrote:
As Copilot also detected, this will segfault.
https://github.com/llvm/llvm-project/pull/204327
More information about the Mlir-commits
mailing list