diff options
author | Chris Lattner <sabre@nondot.org> | 2011-04-14 18:47:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-04-14 18:47:18 +0000 |
commit | b8295f7a0ecb212e2ccc17eaf38fc949fd17943d (patch) | |
tree | 2f884ad35d5a162b6e08d01600b4c56f463d5061 /lib/Target/X86/README.txt | |
parent | a34d93630ea5864fde8066d5c9638fdda86e1fc1 (diff) | |
download | external_llvm-b8295f7a0ecb212e2ccc17eaf38fc949fd17943d.zip external_llvm-b8295f7a0ecb212e2ccc17eaf38fc949fd17943d.tar.gz external_llvm-b8295f7a0ecb212e2ccc17eaf38fc949fd17943d.tar.bz2 |
move PR9661 out to here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/README.txt')
-rw-r--r-- | lib/Target/X86/README.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Target/X86/README.txt b/lib/Target/X86/README.txt index 1ac2305..07722f4 100644 --- a/lib/Target/X86/README.txt +++ b/lib/Target/X86/README.txt @@ -2016,3 +2016,27 @@ We currently generate: We could save an instruction here by commuting the addss. //===---------------------------------------------------------------------===// + +This (from PR9661): + +float clamp_float(float a) { + if (a > 1.0f) + return 1.0f; + else if (a < 0.0f) + return 0.0f; + else + return a; +} + +Could compile to: + +clamp_float: # @clamp_float + movss .LCPI0_0(%rip), %xmm1 + minss %xmm1, %xmm0 + pxor %xmm1, %xmm1 + maxss %xmm1, %xmm0 + ret + +with -ffast-math. + +//===---------------------------------------------------------------------===// |