[PATCH] D81999: libclc: Fix rounding during type conversion

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 22:24:52 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG59510c421208: libclc: Fix rounding during type conversion (authored by daniels, committed by tstellar).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81999/new/

https://reviews.llvm.org/D81999

Files:
  libclc/generic/lib/gen_convert.py


Index: libclc/generic/lib/gen_convert.py
===================================================================
--- libclc/generic/lib/gen_convert.py
+++ libclc/generic/lib/gen_convert.py
@@ -355,7 +355,7 @@
     print("  return convert_{DST}{N}(x);".format(DST=dst, N=size))
   else:
     print("  {DST}{N} r = convert_{DST}{N}(x);".format(DST=dst, N=size))
-    print("  {SRC}{N} y = convert_{SRC}{N}(y);".format(SRC=src, N=size))
+    print("  {SRC}{N} y = convert_{SRC}{N}(r);".format(SRC=src, N=size))
     if mode == '_rtz':
       if src in int_types:
         print("  {USRC}{N} abs_x = abs(x);".format(USRC=unsigned_type[src], N=size))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81999.367713.patch
Type: text/x-patch
Size: 642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210820/8dff7a8a/attachment.bin>


More information about the llvm-commits mailing list