llvm-project
c6096a11 - [DA] Add test for RDIV misses dependency due to "minor algebra" (NFC) (#179653)

Commit
71 days ago
[DA] Add test for RDIV misses dependency due to "minor algebra" (NFC) (#179653) The function `testRDIV` contains the following comments: ``` // With minor algebra, this test can also be used for things like // [c1 + a1*i + a2*j][c2]. ``` ``` // we have 3 possible situations here: // 1) [a*i + b] and [c*j + d] // 2) [a*i + c*j + b] and [d] // 3) [b] and [a*i + c*j + d] // We need to find what we've got and get organized ``` In case `2)`, it moves `c*j` from `Src` to `Dst` and performs dependence testing between `[a*i + b]` and `[-c*j + d]`. Similar algebraic manipulations are applied in case `3)`. This "minor algebra" is unsound in LLVM because whether wraps occur can change. This patch adds a test case to illustrate the issue.
Author
Parents
Loading