[Mlir-commits] [mlir] 1f13963 - [mlir][pdl] Cast the OperationPosition to Position to fix MSVC miscompile
River Riddle
llvmlistbot at llvm.org
Tue Mar 16 16:19:48 PDT 2021
Author: River Riddle
Date: 2021-03-16T16:11:14-07:00
New Revision: 1f13963ec14a5c664633f78856e70de1d40258cd
URL: https://github.com/llvm/llvm-project/commit/1f13963ec14a5c664633f78856e70de1d40258cd
DIFF: https://github.com/llvm/llvm-project/commit/1f13963ec14a5c664633f78856e70de1d40258cd.diff
LOG: [mlir][pdl] Cast the OperationPosition to Position to fix MSVC miscompile
If we don't cast, MSVC picks an overload that hasn't been defined yet(not sure why) and miscompiles.
Added:
Modified:
mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
index bcd32dfa4bef..3061d464fe8b 100644
--- a/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
+++ b/mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
@@ -94,7 +94,8 @@ static void getOperandTreePredicates(std::vector<PositionalPredicate> &predList,
predList.emplace_back(resultPos, builder.getEqualTo(pos));
// Collect the predicates of the parent operation.
- getTreePredicates(predList, op.parent(), builder, inputs, parentPos);
+ getTreePredicates(predList, op.parent(), builder, inputs,
+ (Position *)parentPos);
});
}
More information about the Mlir-commits
mailing list