[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown
While we indeed can't treat them as no-ops, i believe we can/should
do better than just modelling them as `unknown`. `inttoptr` story
is complicated, but for `ptrtoint`, it seems straight-forward
to model it just as a zext-or-trunc of unknown.
This may be important now that we track towards
making inttoptr/ptrtoint casts not no-op,
and towards preventing folding them into loads/etc
(see D88979/D88789/D88788)
Reviewed By: mkazantsev
Differential Revision: https://reviews.llvm.org/D88806
GitOrigin-RevId: 1c021c64caef83cccb719c9bf0a2554faa6563af
diff --git a/test/Isl/CodeGen/scev_looking_through_bitcasts.ll b/test/Isl/CodeGen/scev_looking_through_bitcasts.ll
index 1012e23..321e98a 100644
--- a/test/Isl/CodeGen/scev_looking_through_bitcasts.ll
+++ b/test/Isl/CodeGen/scev_looking_through_bitcasts.ll
@@ -32,6 +32,5 @@
; CHECK: polly.stmt.cond.end73.i:
-; CHECK-NEXT: %0 = bitcast %structty** %b.s2a to i8**
-; CHECK-NEXT: store i8* undef, i8** %0
+; CHECK-NEXT: store %structty* undef, %structty** %b.s2a
; CHECK-NEXT: br label %polly.exiting