[llvm-bugs] [Bug 44897] New: [AArch64][StrctFP] constrained sitofp.f32.i16 crashes at -O0

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 13 09:52:38 PST 2020


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

            Bug ID: 44897
           Summary: [AArch64][StrctFP] constrained sitofp.f32.i16 crashes
                    at -O0
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: diogo.sampaio at arm.com
          Reporter: diogo.sampaio at arm.com
                CC: craig.topper at gmail.com, htmldeveloper at gmail.com,
                    llvm-bugs at lists.llvm.org

>From this IR:
===
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-arm-none-eabi"

define hidden i32 @test() #0 {
entry:
  %conv = call float @llvm.experimental.constrained.sitofp.f32.i32(i32 1,
metadata !"round.tonearest", metadata !"fpexcept.strict") #2
  %conv1 = call float @llvm.experimental.constrained.sitofp.f32.i16(i16 1,
metadata !"round.tonearest", metadata !"fpexcept.strict") #2
  %cmp = call i1 @llvm.experimental.constrained.fcmp.f32(float %conv, float
%conv1, metadata !"oeq", metadata !"fpexcept.strict") #2
  %conv2 = zext i1 %cmp to i32
  ret i32 %conv2
}
declare float @llvm.experimental.constrained.sitofp.f32.i32(i32, metadata,
metadata) #1
declare float @llvm.experimental.constrained.sitofp.f32.i16(i16, metadata,
metadata) #1
declare i1 @llvm.experimental.constrained.fcmp.f32(float, float, metadata,
metadata) #1

attributes #0 = { noinline nounwind optnone
"correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false"
"frame-pointer"="none" "less-precise-fpmad"="false"
"min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false"
"no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false"
"no-trapping-math"="false" "stack-protector-buffer-size"="8"
"target-cpu"="generic" "target-features"="+neon" "unsafe-fp-math"="false"
"use-soft-float"="false" }
attributes #1 = { inaccessiblememonly nounwind willreturn }
attributes #2 = { strictfp }

===

compiling using llc -O0 it dies with:

llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1340: bool
llvm::DAGTypeLegalizer::PromoteIntegerOperand(llvm::SDNode*, unsigned int):
Assertion `Res.getValueType() == N->getValueType(0) && N->getNumValues() == 1
&& "Invalid operand expansion"' failed.

-- 
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/20200213/b0ddf247/attachment.html>


More information about the llvm-bugs mailing list