[llvm] [Value] Look through inttoptr (add ..) in accumulateConstantOffsets (PR #124981)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 30 05:42:02 PST 2025
================
@@ -5,26 +5,23 @@
define i1 @known_constexpr_add_eq() {
; CHECK-LABEL: define i1 @known_constexpr_add_eq() {
-; CHECK-NEXT: [[COND:%.*]] = icmp eq ptr getelementptr inbounds nuw (i8, ptr @glob, i64 80), inttoptr (i64 add (i64 ptrtoint (ptr @glob to i64), i64 -80) to ptr)
-; CHECK-NEXT: ret i1 [[COND]]
+; CHECK-NEXT: ret i1 false
;
%cond = icmp eq ptr getelementptr inbounds nuw (i8, ptr @glob, i64 80), inttoptr (i64 add (i64 ptrtoint (ptr @glob to i64), i64 -80) to ptr)
ret i1 %cond
}
define i1 @known_constexpr_add_eq_ops_swapped() {
----------------
nikic wrote:
I don't get what the difference between this test and the previous is. What's swapped here?
https://github.com/llvm/llvm-project/pull/124981
More information about the llvm-commits
mailing list