aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorFabian Mora <fmora.dev@gmail.com>2025-06-24 07:55:12 -0400
committerGitHub <noreply@github.com>2025-06-24 07:55:12 -0400
commit8f4da2cbf055ec7b9b66d757afcba1b942385874 (patch)
tree0a4811225b39428f70435e22c38ae8cfb20be71c /clang/lib/CodeGen/CodeGenModule.h
parent1dc46d45fcf7869f7e8edc5315aec6158f77966e (diff)
downloadllvm-8f4da2cbf055ec7b9b66d757afcba1b942385874.zip
llvm-8f4da2cbf055ec7b9b66d757afcba1b942385874.tar.gz
llvm-8f4da2cbf055ec7b9b66d757afcba1b942385874.tar.bz2
[mlir][affine] Fix min simplification in makeComposedAffineApply (#145376)
This patch fixes a bug discovered in the `affine::makeComposedFoldedAffineApply` function when `composeAffineMin == true`. The bug happened because the simplification assumed the symbols appearing in the `affine.apply` op corresponded to symbols in the `affine.min` op, and that's not always the case. For example: ```mlir #map = affine_map<()[s0, s1] -> (s1)> #map1 = affine_map<()[s0, s1] -> (s0 ceildiv s1)> module { func.func @min_max_full_simplify() -> index { %0 = test.value_with_bounds {max = 64 : index, min = 32 : index} %1 = test.value_with_bounds {max = 64 : index, min = 32 : index} %2 = affine.min #map()[%0, %1] %3 = affine.apply #map1()[%2, %0] return %3 : index } } ``` This patch also introduces the test `make_composed_folded_affine_apply` transform operation to test this simplification. It also adds tests ensuring we get correct behavior. --------- Co-authored-by: Nicolas Vasilache <nico.vasilache@amd.com>
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
0 files changed, 0 insertions, 0 deletions