When the first commutative instruction in a region using the same value in both positions was compared to a corresponding instruction with two different values, there was an early check that determined that since the values were new, it was true that these values acted in the same way structurally. If this was not contradicted later in the program, the regions were marked as similar. This removes that check, so that it is clear that the same value cannot be mapped to two different values.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I think this is fine. I have a couple nits on the comments, but I won't hold up review over them.
llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp | ||
---|---|---|
2622 | I think this comment would be clearer if you said "ensure that <instruction in test> is not mapped the same as <other instruction in test>"; it's not clear to me what's going on here right now. | |
2629 | This is minor, but it would be really useful to have names for the variables here which describe what they're doing if possible. E.g. %commutative_inst = mul i64 undef, undef ... |
Comment Actions
Hi,
This seems to solve the crash I reported in
https://github.com/llvm/llvm-project/issues/55131
Do you think it actually fixed the problem so that issue should be closed or is it just hidden?
I think this comment would be clearer if you said "ensure that <instruction in test> is not mapped the same as <other instruction in test>"; it's not clear to me what's going on here right now.