llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

assertion failure in induction variable simplification with zext

Open llvmbot opened this issue 8 years ago • 3 comments

Bugzilla Link 37004
Version trunk
OS Linux
Attachments reduced test
Reporter LLVM Bugzilla Contributor
CC @nemanjai,@stefanp-ibm

Extended Description

Originally found on Power, but get same behavior with X86.

% opt bugpoint-reduced-simplified.bc -indvars -o /dev/null ... Stack dump: 0. Program arguments: opt bugpoint-reduced-simplified.bc -indvars -o /dev/null

  1.  Running pass 'Function Pass Manager' on module 'bugpoint-reduced-simplified.bc'.
    
  2.  Running pass 'Loop Pass Manager' on function '@bug'
    
  3.  Running pass 'Induction Variable Simplification' on basic block '%L.B0155'
    

Segmentation fault

llvmbot avatar Apr 04 '18 18:04 llvmbot

This has been committed long ago. Is this fixed and can be closed?

nemanjai avatar Apr 13 '21 02:04 nemanjai

https://reviews.llvm.org/D80975 should resolve the failure in comment 1.

llvmbot avatar Jun 03 '20 06:06 llvmbot

It looks like this bug is hidden by this patch: https://reviews.llvm.org/D47974

The test case provided no longer fails.

I've updated the test case as follows:

$ cat bugpoint-reduced-simplified.ll ; ModuleID = 'bugpoint-reduced-simplified.bc' source_filename = "bugpoint-output-4e419f3.bc" target datalayout = "e-p:64:64-i64:64-n32:64" target triple = "powerpc64le-linux"

; Function Attrs: inlinehint define void @​bug() local_unnamed_addr #​0 personality i8* bitcast (i32 (...)* @​__gxx_personality_v0 to i8*) { L.entry: br label %L.B0155

L.B0155: ; preds = %L.B0155, %L.entry %.G0001.addr.0 = phi i8* [ null, %L.entry ], [ %2, %L.B0155 ] %p.addr.0 = phi i32 [ 0, %L.entry ], [ %1, %L.B0155 ] %0 = zext i32 %p.addr.0 to i64 %1 = add i32 %p.addr.0, 1 %2 = getelementptr i8, i8* %.G0001.addr.0, i64 1 br i1 undef, label %L.B0156, label %L.B0155

L.B0156: ; preds = %L.B0155 call void @​foo(i64 %0) ret void }

declare i32 @​__gxx_personality_v0(...)

declare void @​foo(i64)

attributes #​0 = { inlinehint }

!llvm.module.flags = !{#0}

!​0 = !{i32 1, !"Debug Info Version", i32 3}

The above example still fails with top of trunk. To run use: opt bugpoint-reduced-simplified.ll -indvars -o /dev/null

stefanp-synopsys avatar Sep 10 '18 18:09 stefanp-synopsys