Issue 55375
Summary LoopVectorize crash with opaque pointers
Labels new issue
Assignees
Reporter aeubanks
    Not actually 100% sure if opaque pointers is at fault, but 

```
$ cat /tmp/d.ll
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-linux-gnu"

%"class.gtl::intrusive_link" = type { ptr, ptr }
%"class.gtl::intrusive_list" = type { %"class.gtl::intrusive_link" }

define void @f() #0 {
  br label %1

1:                                                ; preds = %1, %0
  %2 = phi ptr [ %4, %1 ], [ null, %0 ]
  %3 = getelementptr inbounds %"class.gtl::intrusive_link", ptr %2, i64 0, i32 1
  store ptr %2, ptr %3, align 8
  store ptr null, ptr %2, align 8
  %4 = getelementptr inbounds %"class.gtl::intrusive_list", ptr %2, i64 1
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %1

6:                                                ; preds = %1
  ret void
}

attributes #0 = { "target-cpu"="haswell" }
$ ./build/rel/bin/opt -passes=loop-vectorize -S /tmp/d.ll
opt: ../../llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:10154: llvm::Value *llvm::VPTransformState::get(llvm::VPValue *, unsigned int): Assertion `(isa<VPWidenIntOrFpInductionRecipe>(Def->getDef()) || isa<VPScalarIVStepsRecipe>(Def->getDef())) && "unexpected recipe found to be invariant"' failed.
```

@fhahn 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to