https://bugs.llvm.org/show_bug.cgi?id=49762
Bug ID: 49762
Summary: fptoui double to i16 produces fcvtzs (signed) instead
of fcvtzu (unsigned)
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: AArch64
Assignee: unassignedb...@nondot.org
Reporter: mar...@martin.st
CC: arnaud.degrandmai...@arm.com,
llvm-bugs@lists.llvm.org, smithp...@googlemail.com,
ties.st...@arm.com
$ cat test.c
unsigned short func1(double d) {
return d;
};
unsigned int func2(double d) {
return d;
};
$ clang -target aarch64-linux-gnu test.c -S -o - -O2
func1: // @func1
.cfi_startproc
fcvtzs w0, d0
ret
func2: // @func2
.cfi_startproc
fcvtzu w0, d0
ret
When doing fptoui to i32, this selects a fcvtzu instruction, while it selects
fcvtzs when converting to i16. (I'm not sure if this is a bug per se, or if the
C/IR specs allows this, but if nothing else, it feels rather inconsistent.)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs