<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - rL373738 hits assertion in lib/Target/ARM/ARMFrameLowering.cpp:468"
   href="https://bugs.llvm.org/show_bug.cgi?id=44231">44231</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>rL373738 hits assertion in lib/Target/ARM/ARMFrameLowering.cpp:468
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: ARM
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>alina.sbirlea@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org, Ties.Stuij@arm.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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
}</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>