[inductor] Reland #95567 part 1 (#96023)
This is the non-problematic part of #95567. The errors were coming from
IR printing changes which will be next in the stack.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96023
Approved by: https://github.com/ngimel, https://github.com/mlazos