llvm-6502/test
Hal Finkel 64fa501b10 Apply the InstCombine fptrunc sqrt optimization to llvm.sqrt
InstCombine, in visitFPTrunc, applies the following optimization to sqrt calls:

  (fptrunc (sqrt (fpext x))) -> (sqrtf x)

but does not apply the same optimization to llvm.sqrt. This is a problem
because, to enable vectorization, Clang generates llvm.sqrt instead of sqrt in
fast-math mode, and because this optimization is being applied to sqrt and not
applied to llvm.sqrt, sometimes the fast-math code is slower.

This change makes InstCombine apply this optimization to llvm.sqrt as well.

This fixes the specific problem in PR17758, although the same underlying issue
(optimizations applied to libcalls are not applied to intrinsics) exists for
other optimizations in SimplifyLibCalls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194935 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-16 21:29:08 +00:00
..
Analysis Use correct size for address space in BasicAA. 2013-11-16 00:36:43 +00:00
Assembler Add addrspacecast instruction. 2013-11-15 01:34:59 +00:00
Bindings [OCaml] Add REQUIRES: native, object-emission to the Target test 2013-11-15 03:43:51 +00:00
Bitcode Change BitcodeReader to use error_code instead of bool + string. 2013-11-04 16:16:24 +00:00
BugPoint
CodeGen Fix assert on unaligned access to global with different address space size. 2013-11-16 20:50:54 +00:00
DebugInfo For dwarf4 use the correct form for referencing debug_loc locations, 2013-11-16 00:18:40 +00:00
ExecutionEngine Add XFAIL:arm again on 4 MCJIT tests, since r194558. AArch64 has been left removed. 2013-11-13 07:43:10 +00:00
Feature Add addrspacecast instruction. 2013-11-15 01:34:59 +00:00
FileCheck FileCheck: fix matching of one check-prefix is a prefix of another 2013-11-13 14:12:52 +00:00
Instrumentation Reapply "[asan] Poor man's coverage that works with ASan" 2013-11-15 07:16:09 +00:00
Integer
JitListener
Linker Debug Info: remove duplication of DIEs when a DIE can be shared across CUs. 2013-10-31 17:54:35 +00:00
LTO Protect user-supplied runtime library functions in LTO 2013-11-12 21:44:01 +00:00
MC Use instr mapping for microMIPS in llvm-mc. 2013-11-15 08:07:34 +00:00
Object llvm-ar: Let opening a directory failed in llvm-ar. 2013-11-08 12:35:56 +00:00
Other Add addrspacecast instruction. 2013-11-15 01:34:59 +00:00
TableGen Mark 36 tests as XFAIL:vg_leak in llvm/test/TableGen. 2013-11-10 14:26:08 +00:00
tools Path: Recognize COFF import library file magic. 2013-11-15 21:22:02 +00:00
Transforms Apply the InstCombine fptrunc sqrt optimization to llvm.sqrt 2013-11-16 21:29:08 +00:00
Unit
Verifier Add Verifier test case for variable argument intrinsics. 2013-10-31 17:18:17 +00:00
YAMLParser [Support][YAML] Add support for accessing tags and tag handle substitution. 2013-10-18 22:38:04 +00:00
CMakeLists.txt lit: add missing substitutions for recently added tools 2013-10-28 23:37:49 +00:00
lit.cfg lit: add missing substitutions for recently added tools 2013-10-28 23:37:49 +00:00
lit.site.cfg.in
Makefile [OCaml] Dynamically link LLVM on --enable-shared builds 2013-11-12 20:55:49 +00:00
Makefile.tests
TestRunner.sh