We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimal example:
func.func private @foo(index) -> () %c0 = arith.constant 0 : index %c1 = arith.constant 1 : index %c2 = arith.constant 2 : index %c3 = arith.constant 3 : index %c6 = arith.constant 6 : index scf.for %i = %c1 to %c6 step %c2 { %val = arith.muli %i, %c3 : index func.call @foo(%val) : (index) -> () } // mlir-opt --scf-for-loop-range-folding --canonicalize func.func private @foo(index) %c6 = arith.constant 6 : index %c18 = arith.constant 18 : index %c1 = arith.constant 1 : index scf.for %arg0 = %c1 to %c18 step %c6 { func.call @foo(%arg0) : (index) -> () }
In Python syntax:
a = [i * 3 for i in range(1, 6, 2)] b = list(range(3, 18, 6))
Both a and b are [3, 9, 15]
a
b
[3, 9, 15]
The text was updated successfully, but these errors were encountered:
[mlir][SCF] Multiply lower bound in loop range folding (#111875)
36a4055
Fixes #83482
[mlir][SCF] Multiply lower bound in loop range folding (llvm#111875)
372205a
Fixes llvm#83482
d3cae09
691b133
Successfully merging a pull request may close this issue.
Minimal example:
In Python syntax:
Both
a
andb
are[3, 9, 15]
The text was updated successfully, but these errors were encountered: