This patch adds another test case for the new 1:N type conversion utils
testing that the proper user materializations are applied depending on
which of the ops in are converted by the test pass.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/test/Conversion/OneToNTypeConversion/one-to-n-type-conversion.mlir | ||
---|---|---|
125 | All of these checks seems much over-constrained for what we're trying to test. Just using SSA numbers directly is already making this a "fragile" test, but in general it's not clear to me what we're testing exactly here (there are also some unused SSA value there). Can you simplify all theses tests? |
Forgot to provide a ref: https://mlir.llvm.org/getting_started/TestingGuide/
mlir/test/Conversion/OneToNTypeConversion/one-to-n-type-conversion.mlir | ||
---|---|---|
113 | Labels are intended to be unique in the FileCheck input I believe, please rename the second function as well |
mlir/test/Conversion/OneToNTypeConversion/one-to-n-type-conversion.mlir | ||
---|---|---|
113 | Thanks for the suggestion. I did just submitted https://reviews.llvm.org/D148012 to address this. | |
125 | Good catch -- I don't understand how I did not see the hard-coded SSA names... https://reviews.llvm.org/D148012 turns them into patterns. I also used CHECK-DAG instead of CHECK-NEXT to be insensitive to the order. Does your issue of being fragile and/or over-constraint go beyond that? The purpose of the test is to test (and illustrate) the 1:N conversion patterns; in particular, the usage of materializations when parts of the IR are converted and others are not. The fact that some SSA values are used is due to the fact how materializations work: on the conversion boundary, the pass adds IR that produces N target-type values for what used to be a single source-type value independently of what they uses are. It may be that the uses get translated such that only a struct subset of these N values are used, so the remaining ones have no uses. |
mlir/test/Conversion/OneToNTypeConversion/one-to-n-type-conversion.mlir | ||
---|---|---|
125 |
I'm not totally sure, I would have to think more into what we're testing here. |
mlir/test/Conversion/OneToNTypeConversion/one-to-n-type-conversion.mlir | ||
---|---|---|
125 | OK, let's leave it as is for now. To my understanding, the tests are in line with the guidelines now. I was just checking whether you had something else in mind.. |
Labels are intended to be unique in the FileCheck input I believe, please rename the second function as well