[llvm-bugs] [Bug 51811] New: [ConstFold] Assertion failure folding llvm.vector.reduce on bitcast

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 9 12:20:50 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51811

            Bug ID: 51811
           Summary: [ConstFold] Assertion failure folding
                    llvm.vector.reduce on bitcast
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: nikita.ppv at gmail.com
                CC: llvm-bugs at lists.llvm.org
            Blocks: 51236

; RUN: opt -S -instsimplify < %s
define i8 @test() {
  %r = call i8 @llvm.vector.reduce.mul.v16i8(<16 x i8> bitcast (<1 x i128>
<i128 20011376718272490338853433276725592320> to <16 x i8>))
  ret i8 %r
}   

declare i8 @llvm.vector.reduce.mul.v16i8(<16 x i8>)

opt: /home/nikic/llvm-project/llvm/include/llvm/Support/Casting.h:104: static
bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To =
llvm::PoisonValue; From = llvm::Constant]: Assertion `Val && "isa<> used on a
null pointer"' failed.
[...]
 #9 0x0000564c89438b9d llvm::Constant::containsPoisonElement() const
(build/bin/opt+0x28bfb9d)
#10 0x0000564c88b69eaa (anonymous
namespace)::ConstantFoldScalarCall1(llvm::StringRef, unsigned int, llvm::Type*,
llvm::ArrayRef<llvm::Constant*>, llvm::TargetLibraryInfo const*, llvm::CallBase
const*) ConstantFolding.cpp:0:0

containsPoisonElement() does not account for the possibility of constant
expressions, in which case getAggregateElement() may return null.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=51236
[Bug 51236] [meta] 13.0.0 Release Blockers
-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210909/0b0bc897/attachment.html>


More information about the llvm-bugs mailing list