Skip to content

Commit 5b49dce

Browse files
rebase fixes
1 parent d4f054d commit 5b49dce

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

mlir/test/Transforms/test-legalizer.mlir

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -491,13 +491,8 @@ func.func @test_1_to_n_block_signature_conversion() {
491491

492492
// CHECK-LABEL: func @test_multiple_1_to_n_replacement()
493493
// CHECK: %[[legal_op:.*]]:4 = "test.legal_op"() : () -> (f16, f16, f16, f16)
494-
// TODO: There should be a single cast (i.e., a single target materialization).
495-
// This is currently not possible due to 1:N limitations of the conversion
496-
// mapping. Instead, we have 3 argument materializations.
497-
// CHECK: %[[cast1:.*]] = "test.cast"(%[[legal_op]]#2, %[[legal_op]]#3) : (f16, f16) -> f16
498-
// CHECK: %[[cast2:.*]] = "test.cast"(%[[legal_op]]#0, %[[legal_op]]#1) : (f16, f16) -> f16
499-
// CHECK: %[[cast3:.*]] = "test.cast"(%[[cast2]], %[[cast1]]) : (f16, f16) -> f16
500-
// CHECK: "test.valid"(%[[cast3]]) : (f16) -> ()
494+
// CHECK: %[[cast:.*]] = "test.cast"(%[[legal_op]]#0, %[[legal_op]]#1, %[[legal_op]]#2, %[[legal_op]]#3) : (f16, f16, f16, f16) -> f16
495+
// CHECK: "test.valid"(%[[cast]]) : (f16) -> ()
501496
func.func @test_multiple_1_to_n_replacement() {
502497
%0 = "test.multiple_1_to_n_replacement"() : () -> (f16)
503498
"test.invalid"(%0) : (f16) -> ()

mlir/test/lib/Dialect/Test/TestPatterns.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,14 +1264,6 @@ class TestMultiple1ToNReplacement : public ConversionPattern {
12641264
// Replace test.multiple_1_to_n_replacement with test.step_1.
12651265
Operation *repl1 = replaceWithDoubleResults(op, "test.step_1");
12661266
// Now replace test.step_1 with test.legal_op.
1267-
// TODO: Ideally, it should not be necessary to reset the insertion point
1268-
// here. Based on the API calls, it looks like test.step_1 is entirely
1269-
// erased. But that's not the case: an argument materialization will
1270-
// survive. And that argument materialization will be used by the users of
1271-
// `op`. If we don't reset the insertion point here, we get dominance
1272-
// errors. This will be fixed when we have 1:N support in the conversion
1273-
// value mapping.
1274-
rewriter.setInsertionPoint(repl1);
12751267
replaceWithDoubleResults(repl1, "test.legal_op");
12761268
return success();
12771269
}

0 commit comments

Comments
 (0)