[mlir][arith] Canonicalization causes miscompilation on mulsi_extended
The code below computes mulsi_extended (-1) * (-1) : i1, which should yield an extended vector with value 1 : i2, or the bitvector 01. However, canonicalization seems to cause the code to miscompile and output the bitvector 11.
Reproduction: https://godbolt.org/z/8MYqsr1xd
Hi!
This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
- Check that no other contributor has already been assigned to this issue. If you believe that no one is actually working on it despite an assignment, ping the person. After one week without a response, the assignee may be changed.
- In the comments of this issue, request for it to be assigned to you, or just create a pull request after following the steps below. Mention this issue in the description of the pull request.
- Fix the issue locally.
- Run the test suite locally. Remember that the subdirectories under
test/create fine-grained testing targets, so you can e.g. usemake check-clang-astto only run Clang's AST tests. - Create a Git commit.
- Run
git clang-format HEAD~1to format your changes. - Open a pull request to the upstream repository on GitHub. Detailed instructions can be found in GitHub's documentation. Mention this issue in the description of the pull request.
If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below.
@llvm/issue-subscribers-good-first-issue
Author: Jacob Yu (pingshiyu)
Reproduction: https://godbolt.org/z/8MYqsr1xd
I would like to take this issue.