[PATCH] [Review Request] A module pass "PromoteHalf"

Wan, Xiaofei xiaofei.wan at intel.com
Fri Aug 15 06:13:23 PDT 2014


Hi joe.abbey, srhines,

When Opts.NativeHalfType is set to 1, Clang will generate IR for half float. Currently, most CPUs don't support fp16 register, fp16 should be promoted to fp32 for computation, then store back the result to fp16.

This is a module pass to transform operations on fp16 to operations on fp32; different back-end could add this pass as needed.

http://reviews.llvm.org/D4926

Files:
  include/llvm/IR/PromoteHalf.h
  include/llvm/InitializePasses.h
  lib/IR/CMakeLists.txt
  lib/IR/Core.cpp
  lib/IR/PromoteHalf.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4926.12553.patch
Type: text/x-patch
Size: 42590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140815/93206a93/attachment.bin>


More information about the llvm-commits mailing list