Commit Graph

29 Commits

Author SHA1 Message Date
Evan Cheng
a5cecd0a13 Remove int_x86_sse2_movl_dq. It's replaced with a string compare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45140 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 01:04:25 +00:00
Evan Cheng
f9b83fcf95 Bring back int_x86_sse2_movl_dq intrinsic for backward compatibility. Make sure
it's auto-upgraded to a shufflevector instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45131 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 22:33:23 +00:00
Anders Carlsson
d04764a8ac All MMX shift instructions took a <2 x i32> vector as the shift amount parameter. Change this to be <1 x i64> instead, which matches the assembler instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45027 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-14 06:38:54 +00:00
Duncan Sands
a3355ffb3d Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute.  Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44544 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03 20:06:50 +00:00
Duncan Sands
dc024674ff Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls.  This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll).  Hopefully
a bitcode guru (who might that be? :) ) will fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27 13:23:08 +00:00
Chandler Carruth
6994040a95 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40807 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-04 01:51:18 +00:00
Reid Spencer
c1126ac7cd Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32157 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 16:21:33 +00:00
Bill Wendling
8f48766286 Changed to using LLVM streams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31955 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 02:09:03 +00:00
Reid Spencer
3da59db637 For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-27 01:05:10 +00:00
Reid Spencer
dd0f8df161 Undo a patch that breaks llvm-as because the warning message is written to
stdout when the output of llvm-as is also written to stdout. We'll have to
fix tcl some other way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28557 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 16:34:59 +00:00
Reid Spencer
c02af8538b Write the WARNING message to cout instead of cerr. Writing to cerr causes
Tcl to claim that the program had an error and thus produces errors in
the dejagnu testing when its really just a warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28556 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 16:05:59 +00:00
Reid Spencer
403d43a1a9 Don't emit useless warning messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27617 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 17:56:16 +00:00
Jim Laskey
e481b94bd5 Cast instruction not inserted into basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27122 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-25 18:40:47 +00:00
Jim Laskey
9b2b21b62a Add some more bulletproofing to auto upgrade of llvm.dbg intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26996 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 20:13:25 +00:00
Jim Laskey
d06b5fc303 Change the argument types of llvm.dbg intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26985 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 18:03:20 +00:00
Chris Lattner
7538f4b52b Bugfix, unbreaking CodeGen/PowerPC/cttz.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26764 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 19:49:57 +00:00
Jim Laskey
5a588a9636 1. Handle removal of all arguments for a morphed intrinsic.
2. Remove the declaration of llvm.dbg.declare.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26745 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 02:00:35 +00:00
Jim Laskey
f4321a3a43 Handle the removal of the debug chain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 13:07:37 +00:00
Chris Lattner
a758b8250d autoupgrade memcpy/memmove/memset with signed counts.
CVS: ----------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26654 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 18:42:10 +00:00
Chris Lattner
329b951b69 Unbreak autouprade of llvm.sqrt, simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26506 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 16:31:22 +00:00
Chris Lattner
ffa987d3ee Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
PR709, and paving the way for future progress.

Significantly refactor autoupgrading code, to handle the more complex case
(where we upgrade one argument in a function), and fix some bugs in it.

Testcase here: llvm/test/Regression/Bytecode/memcpy.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26474 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-02 23:58:40 +00:00
Reid Spencer
e2a5fb0e08 Fix auto-upgrade of intrinsics to work properly with both assembly and
bytecode reading. This code is crufty, the result of much hacking to get things
working correctly. Cleanup patches will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25682 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 11:49:27 +00:00
Reid Spencer
c79925a395 For PR411:
No functionality changes, just improve the code by a) providing better
function names, b) eliminating a call to get_suffix and c) tightening up
a function elimination test to reduce further checking.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25540 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 07:42:30 +00:00
Chris Lattner
f690bc8c07 Remove dead expression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25480 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 18:04:43 +00:00
Chris Lattner
75d3226b5e Don't use invalidated use_iterator's. This fixes a crash compiling povray
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25479 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 18:01:41 +00:00
Reid Spencer
e559184d70 Don't forget about casting the result of an upgraded call to an intrinsic
in the case where it needs to cast back to a signed type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 07:00:29 +00:00
Reid Spencer
ff696cc1fc Make get_suffix faster by using a switch on getTypeID rather than a series
of comparisons on the various type objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25441 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 05:37:27 +00:00
Reid Spencer
4283ac7857 Add a new interface function to AutoUpgrade for simultaneously upgrading
the Function and the CallInst: UpgradeCallsToIntrinsic(Function*). Also,
re-factor the AutoUpgrade implementation to eliminate some duplication of
code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25432 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 01:18:29 +00:00
Reid Spencer
e86bf519e1 For PR411:
This file makes the helper functions for auto-upgrade of llvm assembly and
bytecode more accessible. This is part of de-overloading of intrinsic
functions to support the flat symbol table (no type planes).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25365 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:06:01 +00:00