[llvm-bugs] [Bug 50432] New: generating the "__floatunditf" for arm64 .

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 21 04:21:28 PDT 2021


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

            Bug ID: 50432
           Summary: generating the "__floatunditf" for arm64 .
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: umesh.kalappa0 at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

compiler emits the "__floatunditf" call for arm64 i.e 

$cat test.c 
double funct(unsigned long long num)

{ 
long double test_number = 1.8; 
return (double) (test_number / num) ; 
}
int main_test_error(void)
{ 
funct(178394848); 
return 0; 
}

$clang --target=aarch64-arm-none-eabi -S test.c -O2
$cat test.s 
funct:                                  // @funct
// %bb.0:
        stp     x29, x30, [sp, #-16]!           // 16-byte Folded Spill
        mov     x29, sp
        bl      __floatunditf
        adrp    x8, .LCPI0_0
        mov     v1.16b, v0.16b
        ldr     q0, [x8, :lo12:.LCPI0_0]
        bl      __divtf3
        bl      __trunctfdf2
        ldp     x29, x30, [sp], #16             // 16-byte Folded Reload
        ret
.Lfunc_end0:

the calls like "__floatunditf" ,"__divtf3" and "__trunctfdf2" is not part
compiler_rt builtins for arm /arm  64 .

we believe that  the compiler should generate the call "__aeabi_ul2d"  and
"__aeabi_ddiv" for arm  and we conclude its bug in compiler and we can fix the
same .

-- 
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/20210521/c2eaa78d/attachment.html>


More information about the llvm-bugs mailing list