[llvm-dev] Constant folding some canonicalize intrinsics

Matt Arsenault via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 12 11:05:35 PDT 2017


It isn't OK to always fold it since the exact result is platform 
dependent, but is there some subset of cases where it is OK? I would 
hope cases like constant 0 are universally 0. Would it be OK to 
generically constant fold canonicalize intrinsics with an input that is 
an entirely normal number? By entirely normal I mean not subnormal and 
not inf/nan. These currently block constant folding some OpenCL builtin 
library functions, but in practice the constant inputs that appear 
aren't subnormals that may require flushing.

-Matt



More information about the llvm-dev mailing list