Skip to content
Commit aeac9329 authored by Benjamin Kramer's avatar Benjamin Kramer
Browse files

[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
parent d9ed0dee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment