[IndVars] Support opaque pointers in LFTR
authorNikita Popov <npopov@redhat.com>
Mon, 27 Dec 2021 11:31:02 +0000 (12:31 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 27 Dec 2021 11:32:50 +0000 (12:32 +0100)
commitdaf32b13d7009e4c53cad71132564f49bac61cb7
tree2044e1bc6ab60bce7bb78bf0a2f544500e91c97c
parent508e39afe012e3197be1149812c8e5a47a955fe4
[IndVars] Support opaque pointers in LFTR

Remove the assertion about the pointer element type, only check
that the stride is one. Ultimately, the actual pointer type here
doesn't matter, because SCEVExpander would insert appropriate
casts if necessary.
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/test/Transforms/IndVarSimplify/lftr-opaque-pointers.ll [new file with mode: 0644]