[llvm] Fix incorrect codegen with respect to GEPs #85333 (PR #88440)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 20 05:04:17 PDT 2024
================
@@ -0,0 +1,47 @@
+; RUN: opt -passes=gvn-sink -S %s | FileCheck %s
+
+target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
+target triple = "thumbv7em-none-unknown-eabi"
+
+%"struct.std::pair" = type <{ i32, %struct.substruct, [2 x i8] }>
+%struct.substruct = type { i8, i8 }
+%"struct.std::random_access_iterator_tag" = type { i8 }
+
+; CHECK: if.end6
+; CHECK: %incdec.ptr.sink = phi ptr [ %incdec.ptr, %if.then ], [ %incdec.ptr4, %if.then3 ], [ %add.ptr, %if.else5 ]
+; CHECK-NEXT: store ptr %incdec.ptr.sink, ptr %__i, align 4
+
+define linkonce_odr dso_local void @__advance(ptr noundef nonnull align 4 dereferenceable(4) %__i, i32 noundef %__n) local_unnamed_addr {
+entry:
+ %0 = call i1 @llvm.is.constant.i32(i32 %__n)
----------------
nikic wrote:
This test looks very non-minimal.
https://github.com/llvm/llvm-project/pull/88440
More information about the llvm-commits
mailing list