[PATCH] D153004: [LSR] Consider post-inc form when creating extends/truncates.
Ron Lieberman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 4 11:11:26 PDT 2023
ronlieb added a comment.
Hi, I ran into
llvm-project/llvm/include/llvm/Support/Casting.h:109: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::SCEVAddRecExpr; From = llvm::SCEV]: Assertion `Val && "isa<> used on a null pointer"' failed.
llc < test.ll
source_filename = "mmulint8-4ce5aa.c"
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-unknown-linux-gnu"
@.str = external dso_local unnamed_addr constant [35 x i8], align 1
@.str.1 = external dso_local unnamed_addr constant [36 x i8], align 1
define dso_local void @f90_matmul_int8_i8(ptr %dest_addr) local_unnamed_addr #0 {
entry:
br i1 poison, label %if.then87, label %if.then87.sink.split
if.then87.sink.split: ; preds = %entry
unreachable
if.then87: ; preds = %entry
br i1 poison, label %if.then112, label %if.end124
if.then112: ; preds = %if.then87
%0 = load i64, ptr poison, align 8
%1 = load i64, ptr poison, align 8
br label %if.then137
if.end124: ; preds = %if.then87
%2 = load i64, ptr poison, align 8
%3 = load i64, ptr poison, align 8
br label %if.then137
if.then137: ; preds = %if.end124, %if.then112
%4 = phi i64 [ %1, %if.then112 ], [ %3, %if.end124 ]
%5 = phi i64 [ %0, %if.then112 ], [ %2, %if.end124 ]
%6 = load i64, ptr poison, align 8
%add.ptr162 = getelementptr inbounds i64, ptr %dest_addr, i64 %6
%mul163 = mul nsw i64 %5, %4
%add.ptr164 = getelementptr inbounds i64, ptr %add.ptr162, i64 %mul163
%add.ptr166 = getelementptr inbounds i64, ptr %add.ptr164, i64 poison
%add.ptr167 = getelementptr inbounds i64, ptr %add.ptr166, i64 -1
%add.ptr249.us = getelementptr inbounds i64, ptr %add.ptr167, i64 0
br i1 poison, label %for.cond251.for.inc255_crit_edge.us.unr-lcssa, label %for.body253.us
for.body253.us: ; preds = %for.body253.us, %if.then137
%d_elem_p.0541.us = phi ptr [ %add.ptr254.us.7, %for.body253.us ], [ %add.ptr249.us, %if.then137 ]
store i64 0, ptr %d_elem_p.0541.us, align 8
%add.ptr254.us = getelementptr inbounds i64, ptr %d_elem_p.0541.us, i64 %5
%add.ptr254.us.1 = getelementptr inbounds i64, ptr %add.ptr254.us, i64 %5
store i64 0, ptr %add.ptr254.us.1, align 8
%add.ptr254.us.2 = getelementptr inbounds i64, ptr %add.ptr254.us.1, i64 %5
%add.ptr254.us.3 = getelementptr inbounds i64, ptr %add.ptr254.us.2, i64 %5
store i64 0, ptr %add.ptr254.us.3, align 8
%add.ptr254.us.4 = getelementptr inbounds i64, ptr %add.ptr254.us.3, i64 %5
%add.ptr254.us.5 = getelementptr inbounds i64, ptr %add.ptr254.us.4, i64 %5
store i64 0, ptr %add.ptr254.us.5, align 8
%add.ptr254.us.6 = getelementptr inbounds i64, ptr %add.ptr254.us.5, i64 %5
%add.ptr254.us.7 = getelementptr inbounds i64, ptr %add.ptr254.us.6, i64 %5
br i1 poison, label %for.cond251.for.inc255_crit_edge.us.unr-lcssa, label %for.body253.us
for.cond251.for.inc255_crit_edge.us.unr-lcssa: ; preds = %for.body253.us, %if.then137
%d_elem_p.0541.us.unr = phi ptr [ %add.ptr249.us, %if.then137 ], [ %add.ptr254.us.7, %for.body253.us ]
ret void
}
attributes #0 = { "tune-cpu"="generic" }
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153004/new/
https://reviews.llvm.org/D153004
More information about the llvm-commits
mailing list