[InstCombine] Convert some tests to opaque pointers (NFC)
authorNikita Popov <npopov@redhat.com>
Tue, 3 Jan 2023 15:58:25 +0000 (16:58 +0100)
committerNikita Popov <npopov@redhat.com>
Tue, 3 Jan 2023 16:20:43 +0000 (17:20 +0100)
commit82cf72a83b0823b9426f280f8620daab67c221e4
treeb0a9e49fd6c5f669fb72f31e415db036e49bd15e
parent850adc1ddc41c626ecdfc89a083518343ad2fbf6
[InstCombine] Convert some tests to opaque pointers (NFC)

These involved regenerating test checks. There are two significant
differences here:

1. With typed pointers we sometimes swapped gep and addrspacecast,
   as a side-effect of other transforms. However, the current
   direction is likely undesirable, and we should canonicalize in
   the reverse direction instead (gep of ac, instead of ac of gep).
   This should be done after typed pointers are removed, to avoid
   conflicting transforms.

2. The "descaling" optimization isn't really compatible with
   opaque pointers. This will be addressed longer-term by moving
   away from type-based GEP, at which point the form with explicit
   multiplications will be the canonical one.
llvm/test/Transforms/InstCombine/cast.ll
llvm/test/Transforms/InstCombine/gep-addrspace.ll
llvm/test/Transforms/InstCombine/gep-custom-dl.ll
llvm/test/Transforms/InstCombine/gep-vector.ll
llvm/test/Transforms/InstCombine/getelementptr.ll