[llvm-bugs] [Bug 44231] New: rL373738 hits assertion in lib/Target/ARM/ARMFrameLowering.cpp:468

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 5 16:27:07 PST 2019


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

            Bug ID: 44231
           Summary: rL373738 hits assertion in
                    lib/Target/ARM/ARMFrameLowering.cpp:468
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: alina.sbirlea at gmail.com
                CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org,
                    Ties.Stuij at arm.com

assert.h assertion failed at llvm/lib/Target/ARM/ARMFrameLowering.cpp:468 in
virtual void llvm::ARMFrameLowering::emitPrologue(llvm::MachineFunction &,
llvm::MachineBasicBlock &) const: getMaxFPOffset(MF.getFunction(), *AFI) <=
FPOffset && "Max FP estimation is wrong"


To reproduce:
../bin/llc -O3 --mtriple=arm-apple-ios --mcpu=cortex-a9 --mattr=+neon test.ll


On:

target datalayout =
"e-m:o-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
target triple = "arm-apple-ios"

%buffer_t = type { i64, i32 } 
%closure_t = type { i32 }
declare float @llvm.floor.f32(float) 
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) 
declare void @llvm.trap() 

define void @func(%buffer_t* noalias %input.buffer, float %scale_factor)
local_unnamed_addr {
entry:
  %t0 = alloca %closure_t, align 4
  %dimensions.i = getelementptr inbounds %buffer_t, %buffer_t* %input.buffer,
i32 0, i32 1
  %t1 = icmp slt i32 undef, 32
  %y.i98 = call float @llvm.floor.f32(float undef)
  %b20 = fptosi float %y.i98 to i32
  %t2 = fdiv reassoc nnan ninf nsz contract afn float 0.000000e+00,
%scale_factor
  %t3 = fadd reassoc nnan ninf nsz contract afn float %t2, -5.000000e-01
  %y.i99 = call float @llvm.floor.f32(float %t3)
  %b23 = fptosi float %y.i99 to i32
  %a17 = select i1 false, i32 %b20, i32 undef
  %t4 = select i1 false, i32 %a17, i32 undef
  %a22 = add nsw i32 %b23, 2
  %t5 = select i1 false, i32 %a22, i32 undef
  %a21 = add nsw i32 %t5, -1
  %a20 = select i1 undef, i32 %b23, i32 %a21
  %t6 = select i1 false, i32 %a20, i32 undef
  %input.min.0.required = select i1 %t1, i32 %t4, i32 %t6
  %t7 = bitcast %buffer_t* %input.buffer to i8*
  call void @llvm.memset.p0i8.i64(i8* nonnull align 8 dereferenceable(16) %t7,
i8 0, i64 16, i1 false)
  store i32 2, i32* %dimensions.i, align 4
  %.sroa.0.0..sroa_cast = bitcast i8* undef to i32*
  store i32 %input.min.0.required, i32* %.sroa.0.0..sroa_cast, align 4
  call void @llvm.trap()
  unreachable
}

-- 
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/20191206/37a80320/attachment.html>


More information about the llvm-bugs mailing list