[Chapel Merge] Compare slicing expression types to avoid promotion in Array View Elision support code

Branch: refs/heads/main
Revision: 33dbeace830673bd95761481b35b4755b9c222b2
Author: e-kayrakli
Link: Compare slicing expression types to avoid promotion in Array View Elision support code by e-kayrakli · Pull Request #25478 · chapel-lang/chapel · GitHub
Log Message:
Compare slicing expression types to avoid promotion in Array View Elision support code (#25478)

A statement like

Arr1[1..9] = Arr2[{1..9}];

resulted in doing something akin to

1..9 == {1..9};

which is a promoted expression. That caused some resolution errors
downstream. This PR compares chpl__protoSlice types before doing the
comparison that resulted in promotion to prevent that.

[Trivial fix for a long-standing nightly failure, not reviewed]

Test:

  • linux64
  • gasnet

Compare: Comparing adc72107e038052bff389f27595675d47fe84131...6f842e5cea9cb6edaf0d64384d49bc5241fd5d5a · chapel-lang/chapel · GitHub

Diff:
M modules/internal/ChapelArrayViewElision.chpl
A test/optimizations/arrayViewElision/rangeVsDomain.chpl
A test/optimizations/arrayViewElision/rangeVsDomain.comm-none.good
A test/optimizations/arrayViewElision/rangeVsDomain.compopts
A test/optimizations/arrayViewElision/rangeVsDomain.good
https://github.com/chapel-lang/chapel/pull/25478.diff