OSDN Git Service

Add minnum / maxnum intrinsics
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 21 Oct 2014 23:00:20 +0000 (23:00 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 21 Oct 2014 23:00:20 +0000 (23:00 +0000)
commit252134602f42689c9514525b09d277947aecc55e
tree0fde3a0c1ada105e1edfc51aceac205d3630fbde
parentcb3866e72e98ce77080deffd008b1d8e9b7d5301
Add minnum / maxnum intrinsics

These are named following the IEEE-754 names for these
functions, rather than the libm fmin / fmax to avoid
possible ambiguities. Some languages may implement something
resembling fmin / fmax which return NaN if either operand is
to propagate errors. These implement the IEEE-754 semantics
of returning the other operand if either is a NaN representing
missing data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220341 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
docs/LangRef.rst
include/llvm/IR/Intrinsics.td
include/llvm/IR/PatternMatch.h
include/llvm/Target/TargetSelectionDAG.td
include/llvm/Transforms/Utils/VectorUtils.h
lib/Analysis/ConstantFolding.cpp
lib/Analysis/TargetTransformInfo.cpp
lib/Analysis/ValueTracking.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/Vectorize/BBVectorize.cpp
test/Transforms/InstCombine/maxnum.ll [new file with mode: 0644]
test/Transforms/InstCombine/minnum.ll [new file with mode: 0644]
test/Transforms/LoopVectorize/intrinsic.ll
test/Transforms/SimplifyCFG/speculate-math.ll