[all-commits] [llvm/llvm-project] aeac93: [SCF] Clean up ForOpTensorCastFolder and harden it...
Benjamin Kramer via All-commits
all-commits at lists.llvm.org
Wed Apr 19 07:06:17 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aeac932943bc7e0c54903d2c4b754e3a87e90fb0
https://github.com/llvm/llvm-project/commit/aeac932943bc7e0c54903d2c4b754e3a87e90fb0
Author: Benjamin Kramer <benny.kra at googlemail.com>
Date: 2023-04-19 (Wed, 19 Apr 2023)
Changed paths:
M mlir/lib/Dialect/SCF/IR/SCF.cpp
Log Message:
-----------
[SCF] Clean up ForOpTensorCastFolder and harden it against nop tensor casts
The code was inserting a new cast, discarding it, then inserting it
again.
The self-cast issue is the root of #62135 because it would end up
dropping the loop and inserting an invalid cast to itself. As far as I
can tell tensor.cast with the same src and dst types is not invalid but
it can't really be tested in isolation as it's immediately folded.
Fixes #62135
Differential Revision: https://reviews.llvm.org/D148714
More information about the All-commits
mailing list