[llvm-bugs] [Bug 30451] Atomicrmw min i16 produces wrong result on PowerPC
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Dec 28 15:43:14 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=30451
Nemanja Ivanovic <nemanja.i.ibm at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|REOPENED |RESOLVED
--- Comment #11 from Nemanja Ivanovic <nemanja.i.ibm at gmail.com> ---
This isn't the same problem (or really a compiler problem at all). The call to
julia_f_369 is with the value 65535 (i.e. (i16)-1) which is certainly larger
than zero. So the program behaves correctly - exactly as specified in the IR.
You need to specify the extension type for the parameter to the function.
Namely:
define i16 @julia_f_369(i16 %0)
really needs to be:
define i16 @julia_f_369(i16 signext %0)
Otherwise it is "anyext" which defaults to the cheapest one - on PPC, it is
zext.
--
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/20201228/f978d552/attachment.html>
More information about the llvm-bugs
mailing list