[llvm] [Value] Look through inttoptr (add ..) in accumulateConstantOffsets (PR #124981)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 10:43:04 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() {
----------------
fhahn wrote:

Adjusted the name but not the code... fixed now, thanks

https://github.com/llvm/llvm-project/pull/124981


More information about the llvm-commits mailing list