benshi001 added a comment. I summary my suggestion in general, excluding some inline comments about coding details.
1. Seperate the location movement of test files into a different patch A. 2. Seperate the elimination of `AVRRelaxMemPass` / combination into `expand<AVR::STDWPtrQRr>` to a different patch B. 3. I also concern current solution is a bit agresssive, so I would like to suggest a moderate way. 3.1 Kill the function `fixStackStores` and its orginal calls. 3.2 Mark the definition of `STDWSPQRr`/`STDSPQRr` with `Defs = [R31R30]` (Most ordinary `STDWSPQRr`/`STDSPQRr` will be substituted before regalloc, so that is fine.) 3.3 Still implement `expand<AVR::STDSPQRr>` and `expand<AVR::STDWPQRr>` as current patch does, but do not substitute to `AVR::STDPtrQRr`/`AVR::STDWPtrQRr`, we should do real instruction expansion with several `buildMI` calls. Since we have marked `Defs = [R31R30]` to `STDWSPQRr`/`STDSPQRr`, it is safe to expand to in r30, 62 in r31, 63 subiw z, offset std z, Rsrc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114611/new/ https://reviews.llvm.org/D114611 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits