brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · e4352e4 Raw
48 lines · plain
1; RUN: not --crash opt -passes='consthoist' -S -o - -consthoist-gep=1 -mtriple=x86_64-unknown-linux-gnu < %s 2>&1 | FileCheck %s2 3; REQUIRES: asserts4 5; My changes fixed this likely by accident, please update as necessary when6; you work on this:7; XFAIL: *8 9; Matching assertion strings is not easy as they might differ on different10; platforms. So limit this to x86_64-linux.11; REQUIRES: x86_64-linux12 13; This is a reproducer for https://github.com/llvm/llvm-project/issues/5268914;15; opt: ../lib/Transforms/Scalar/ConstantHoisting.cpp:919: bool llvm::ConstantHoistingPass::emitBaseConstants(llvm::GlobalVariable *): Assertion `UsesNum == (ReBasesNum + NotRebasedNum) && "Not all uses are rebased"' failed.16 17; CHECK: UsesNum == (ReBasesNum + NotRebasedNum)18; CHECK-SAME: Not all uses are rebased19 20@g_77 = external global [5 x i32]21 22define internal ptr @func_29(i1 %p1, i1 %p2, ptr %p3) {23entry:24  br i1 %p1, label %crit_edge, label %if.else308925 26crit_edge:                                        ; preds = %entry27  br label %for.cond106328 29for.cond1063:                                     ; preds = %cleanup1660, %crit_edge30  %l_323.sroa.0.0 = phi ptr [ getelementptr inbounds ([5 x i32], ptr @g_77, i32 0, i32 3), %cleanup1660 ], [ null, %crit_edge ]31  %l_323.sroa.2.0 = phi ptr [ getelementptr inbounds ([5 x i32], ptr @g_77, i32 0, i32 3), %cleanup1660 ], [ null, %crit_edge ]32  br i1 %p2, label %cleanup1660.thread, label %cleanup167433 34cleanup1660.thread:                               ; preds = %for.cond106335  br label %cleanup167436 37cleanup1660:                                      ; No predecessors!38  br label %for.cond106339 40cleanup1674:                                      ; preds = %cleanup1660.thread, %for.cond106341  store ptr getelementptr inbounds ([5 x i32], ptr @g_77, i32 0, i32 1), ptr %p3, align 142  ret ptr null43 44if.else3089:                                      ; preds = %entry45  store ptr getelementptr inbounds ([5 x i32], ptr @g_77, i32 0, i32 1), ptr %p3, align 146  ret ptr null47}48