llvm-project
937027de - [flang] Try to keep overflow flags in `FIRToMemRef::canonicalizeIndex'. (#220127)

Commit
2 days ago
[flang] Try to keep overflow flags in `FIRToMemRef::canonicalizeIndex'. (#220127) The method specifically runs on every `fir.array_coor` subscript. For `arith.addi` it recursively canonicalizes both operands and then unconditionally rebuilds the op defaulting flags to `none`. Thus subscript operand becomes a flagless clone, with the original one left behind dead. The patch makes a couple of changes: (1) use the original op if unmodified and (2) when its type preserved keep overflow flags of the original. Assisted-by: Claude Opus 5
Author
Parents
Loading