Commit Graph

202 Commits

Author SHA1 Message Date
Devang Patel db937ec8fa Update tests.
llvm-svn: 56730
2008-09-27 00:25:28 +00:00
Dan Gohman c5d2892e62 Re-enables the new vector select in the bitcode reader, by modifying the
bitcode reader/writer as follows:

- add and use new bitcode FUNC_CODE_INST_VSELECT to handle the llvm
select opcode using either i1 or [N x i1] as the selector.
- retain old BITCODE FUNC_CODE_INST_SELECT in the bitcode reader to
handle select on i1 for backwards compatibility with existing bitcode
files.
- re-enable the vector-select.ll test program.

Also, rename the recently added bitcode opcode FUNC_CODE_INST_VCMP to
FUNC_CODE_INST_CMP2 and make the bitcode writer use it to handle
fcmp/icmp on scalars or vectors. In the bitcode writer, use
FUNC_CODE_INST_CMP for vfcmp/vicmp only. In the bitcode reader, have
FUNC_CODE_INST_CMP handle icmp/fcmp returning bool, for backwards
compatibility with existing bitcode files.

Patch by Preston Gurd!

llvm-svn: 56233
2008-09-16 01:01:33 +00:00
Dan Gohman 7164e9a702 Temporarily disable vector select in the bitcode reader. The
way it handles the type of the condition is breaking plain
scalar select in the case that the value is a
forward-reference.

llvm-svn: 55976
2008-09-09 02:08:49 +00:00
Dan Gohman c579d978a3 Extend the vcmp/fcmp LLVM IR instructions to take vectors as arguments
and, if so, to return a vector of boolean as a result;

Extend the select LLVM IR instruction to allow you to specify a result
type which is a vector of boolean, in which case the result will be an
element-wise selection instead of choosing one vector or the other; and

Update LangRef.html to describe these changes.

This patch was contributed by Preston Gurd!

llvm-svn: 55969
2008-09-09 01:02:47 +00:00
Devang Patel ca9d93e627 Read and write function notes.
llvm-svn: 55657
2008-09-02 21:47:13 +00:00
Devang Patel cc4d6ce532 Function notes tests.
llvm-svn: 55648
2008-09-02 20:58:16 +00:00
Chris Lattner a51c7030e2 Add support for parsing .ll files that have numbers in front of
nameless values, such as:

%3 = add i32 4, 2

This fixes the first half of PR2480

llvm-svn: 55539
2008-08-29 17:12:13 +00:00
Dan Gohman 1a70bcc388 Fix the AsmWriter to not print extra spaces after parameter attributes.
llvm-svn: 54351
2008-08-05 15:51:44 +00:00
Nate Begeman fecbc8cff1 Add vector shifts to the IR, patch by Eli Friedman.
CodeGen & Clang work coming next.

llvm-svn: 54161
2008-07-29 15:49:41 +00:00
Chris Lattner eab49263b5 Fix a bunch of bugs handling vector compare constant expressions, fixing
PR2317.

llvm-svn: 53544
2008-07-14 05:17:31 +00:00
Chris Lattner 61622615ae Implement PR2538
llvm-svn: 53438
2008-07-11 00:30:06 +00:00
Matthijs Kooijman a2f743eaff Fix some escaping and quoting in RUN lines, mainly involving { and <. In two
cases quoting of <{ didn't work out, so I changed the grep to check for }>
instead.

This fixes 7 testcases that were not properly running before.

llvm-svn: 52182
2008-06-10 16:04:47 +00:00
Matthijs Kooijman 30a07a5504 For all RUN lines starting with "not", redirect stderr to /dev/null so tests
don't fail when (expected) error output is produced. This fixes 17 tests.

While I was there, I also made all RUN lines of the form "not llvm-as..." a bit
more consistent, they now all redirect stderr and stdout to /dev/null and use
input redirect to read their input.

llvm-svn: 52174
2008-06-10 12:57:32 +00:00
Dan Gohman 27ae953278 Re-apply 52002, allowing the verifier to accept non-MRV struct return
types on functions, with adjustments so that it accepts both
new-style aggregate returns and old-style MRV returns, including those
with only a single member.

llvm-svn: 52157
2008-06-09 21:26:13 +00:00
Dan Gohman 1d304a99d7 Revert 52002.
llvm-svn: 52030
2008-06-05 23:57:06 +00:00
Matthijs Kooijman 5eef32ba94 Change the Verifier to support returning first class aggregrates.
Add a testcase for functions returning first class aggregrates.

llvm-svn: 52002
2008-06-05 14:00:36 +00:00
Dan Gohman 25b3b49dbc nounwindify.
llvm-svn: 51893
2008-06-03 01:21:11 +00:00
Dan Gohman 3db11c2bd9 Constant folding for insertvalue and extractvalue.
llvm-svn: 51889
2008-06-03 00:15:20 +00:00
Dan Gohman 1ecaf45cf1 IR, bitcode reader, bitcode writer, and asmparser changes to
insertvalue and extractvalue to use constant indices instead of
Value* indices. And begin updating LangRef.html.

There's definately more to come here, but I'm checking this 
basic support in now to make it available to people who are
interested.

llvm-svn: 51806
2008-05-31 00:58:22 +00:00
Dan Gohman fa9dac2859 Don't silently truncate array extents to 32 bits.
llvm-svn: 51505
2008-05-23 21:40:55 +00:00
Dan Gohman 30499844ea Make structs and arrays first-class types, and add assembly
and bitcode support for the extractvalue and insertvalue
instructions and constant expressions.

Note that this does not yet include CodeGen support.

llvm-svn: 51468
2008-05-23 01:55:30 +00:00
Gabor Greif d01c562e48 Eliminate questionable syntax for stdin redirection. This probably also speeds things up a bit.
llvm-svn: 51357
2008-05-20 22:07:21 +00:00
Gabor Greif 1e427c3264 sabre brings to my attention that the 'tr' suffix is also obsolete
llvm-svn: 51349
2008-05-20 21:00:03 +00:00
Gabor Greif f45ff35bfe Rename the last test with .llx extension to .ll, resolve duplicate test by renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too.
llvm-svn: 51328
2008-05-20 19:52:04 +00:00
Chris Lattner f9a4e4d723 returning an empty multiple return list is not valid.
llvm-svn: 50135
2008-04-23 05:29:14 +00:00
Chris Lattner fe48fbc1f1 rename *.llx -> *.ll
llvm-svn: 49969
2008-04-19 22:26:29 +00:00
Chris Lattner bc26e1bb8a Implement PR2206.
llvm-svn: 49967
2008-04-19 22:17:26 +00:00
Dan Gohman 41eb949aaf Teach llvm-as to accept function types with multiple return types.
llvm-svn: 49945
2008-04-19 00:24:39 +00:00
Devang Patel bbfd874cb4 Update bitcode reader and writer to handle multiple return values.
Take 2.

llvm-svn: 47583
2008-02-26 01:29:32 +00:00
Evan Cheng 2f18c39720 Backing out r47521 for now. This has broken a number of tests.
llvm-svn: 47533
2008-02-23 19:32:32 +00:00
Devang Patel 6a49782d33 Properly read and write bitcodes for multiple return values.
llvm-svn: 47521
2008-02-23 01:44:55 +00:00
Devang Patel ad582fc34b Let invoke return aggregate value.
llvm-svn: 47425
2008-02-21 02:14:01 +00:00
Devang Patel 1f00b535e1 Let function call return aggregate.
Now, we have very first multiple return value testcase!

llvm-svn: 47424
2008-02-21 01:54:02 +00:00
Devang Patel fe988eba4b XFAIL for now.
llvm-svn: 47411
2008-02-20 23:10:42 +00:00
Devang Patel b2aa6fe905 Now functions can return aggregate values.
llvm-svn: 47409
2008-02-20 22:51:28 +00:00
Chris Lattner 95816b9dee Fix PR2060 by rejecting invalid types for integer constants.
llvm-svn: 47311
2008-02-19 04:36:07 +00:00
Chris Lattner 8a67d349fe this test isn't useful since we added @ notation for globals.
llvm-svn: 47229
2008-02-17 00:12:03 +00:00
Chris Lattner 0d43732cd0 this line was commented out.
llvm-svn: 47228
2008-02-17 00:09:08 +00:00
Tanya Lattner 47f0a20f8f Remove llvm-upgrade and update tests.
llvm-svn: 47227
2008-02-16 23:55:46 +00:00
Tanya Lattner 231fe4746b Removing llvm upgrade, so remove tests specific to llvm-upgrade and update the tests that used it.
llvm-svn: 47225
2008-02-16 23:27:24 +00:00
Chris Lattner 8f51fa82c0 upgrade this test, which wasn't testing the right thing since llvm-upgrade came around.
llvm-svn: 47194
2008-02-15 23:58:25 +00:00
Chris Lattner e1f41fc68e rename llx -> ll
llvm-svn: 47192
2008-02-15 23:51:48 +00:00
Tanya Lattner 5429dbf6c7 Remove llvm-upgrade
llvm-svn: 47119
2008-02-14 07:57:12 +00:00
Duncan Sands 0ebaf91f48 Two occurrences on one line count as one...
llvm-svn: 45885
2008-01-11 21:46:24 +00:00
Duncan Sands 7e46c50c6a If there are attributes on the varargs part of a
call, don't discard them.

llvm-svn: 45884
2008-01-11 21:23:39 +00:00
Dan Gohman 11352df8e4 Don't redirect stderr when it isn't needed.
llvm-svn: 45033
2007-12-14 15:15:11 +00:00
Anders Carlsson f924f34b6b 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.
llvm-svn: 45027
2007-12-14 06:38:54 +00:00
Christopher Lamb 25f5076612 Implement part of review feedback for address spaces.
llvm-svn: 44933
2007-12-12 08:44:39 +00:00
Dan Gohman b582867567 Use not instead of ignore when an exit status is expected to always
be non-zero.

llvm-svn: 44866
2007-12-11 15:50:23 +00:00
Dan Gohman cfed707c12 Don't redirect stderr when it isn't needed.
llvm-svn: 44865
2007-12-11 15:41:11 +00:00
Christopher Lamb 54dd24c2a7 Implement address space attribute for LLVM pointer types. Address spaces are
regions of memory that have a target specific relationship, as described in the 
Embedded C Technical Report. 

This also implements the 2007-12-11-AddressSpaces test, 
which demonstrates how address space attributes can be used in LLVM IR.

In addition, this patch changes the bitcode signature for stores (in a backwards 
compatible manner), such that the pointer type, rather than the pointee type, is 
encoded. This permits type information in the pointer (e.g. address space) to be 
preserved for stores.

LangRef updates are forthcoming.

llvm-svn: 44858
2007-12-11 08:59:05 +00:00
Chris Lattner d2265b45ae Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use
targetdata to validate that it is safe.  While I'm in there, fix some const
correctness issues and generalize the interface to the "operand folder".

llvm-svn: 44817
2007-12-10 22:53:04 +00:00
Gordon Henriksen 71183b6739 Adding a collector name attribute to Function in the IR. These
methods are new to Function:

  bool hasCollector() const;
  const std::string &getCollector() const;
  void setCollector(const std::string &);
  void clearCollector();

The assembly representation is as such:

  define void @f() gc "shadow-stack" { ...

The implementation uses an on-the-side table to map Functions to 
collector names, such that there is no overhead. A StringPool is 
further used to unique collector names, which are extremely
likely to be unique per process.

llvm-svn: 44769
2007-12-10 03:18:06 +00:00
Tanya Lattner 8f342f8ef3 Fix bug in regression tests that ignored stderr output in RUN lines. Updated tests and fixed broken run lines.
XFAILed 3 arm regressions (will file bugs)

llvm-svn: 44389
2007-11-28 04:57:00 +00:00
Duncan Sands ad0ea2d430 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.

llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Dan Gohman 9ab9e9fa03 Don't redirect llvm-as's stderr to llvm-dis.
Change grep '' to grep {}.

llvm-svn: 44343
2007-11-27 00:07:33 +00:00
Chris Lattner dae70d4d36 Fix PR1645 by resolving forward alias references.
llvm-svn: 41815
2007-09-10 23:23:53 +00:00
Dale Johannesen 6480cc6f8c Change all floating constants that are not exactly
representable to use hex format.

llvm-svn: 41722
2007-09-05 17:50:36 +00:00
Dan Gohman f9dd170e36 Convert tests using "| wc -l | grep ..." to use the count script.
llvm-svn: 41097
2007-08-15 13:36:28 +00:00
Chris Lattner 6a5a2620ba Fix PR1577, a crash on invalid bug.
llvm-svn: 40874
2007-08-06 21:00:37 +00:00
Chandler Carruth 7132e00de7 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.

llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Reid Spencer d45d07ac72 For PR1553:
Make the AsmParser auto-upgrade the old zext and sext
keywords for parameter attributes and handle the 
end-of-line ambiguity.

llvm-svn: 40610
2007-07-31 02:57:37 +00:00
Reid Spencer 314e1cb7ee For PR1553:
Change the keywords for the zext and sext parameter attributes to be 
zeroext and signext so they don't conflict with the keywords for the
instructions of the same name. This gets around the ambiguity.

llvm-svn: 40069
2007-07-19 23:13:04 +00:00
John Criswell 2660cef6d7 Convert .cvsignore files
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
Chris Lattner 9a0ff5961b new testcase for a recent regression
llvm-svn: 37283
2007-05-22 07:00:38 +00:00
Chris Lattner 578cc7483e Remove bogus testcase, PR409 is wontfix
llvm-svn: 36795
2007-05-05 21:49:24 +00:00
Chris Lattner 0cdcadc860 new testcase
llvm-svn: 36468
2007-04-26 05:28:45 +00:00
Reid Spencer 4388f0b4fa For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.

llvm-svn: 36327
2007-04-22 05:46:44 +00:00
Christopher Lamb bff50208c8 add support for alignment attributes on load/store instructions
llvm-svn: 36301
2007-04-21 08:16:25 +00:00
Christopher Lamb aac115a8e5 Test check in
llvm-svn: 36269
2007-04-20 05:05:24 +00:00
Reid Spencer 6e87ec4351 For PR1319:
Remove && from the end of the lines to prevent tests from throwing run
lines into the background. Also, clean up places where the same command
is run multiple times by using a temporary file.

llvm-svn: 36142
2007-04-16 17:36:08 +00:00
Reid Spencer 4dcf8bff4b For PR1319:
Fix syntax of tests to ensure grep pattern is properly quoted.

llvm-svn: 36134
2007-04-16 15:31:49 +00:00
Reid Spencer e7df634b3d Fix the syntax for these tests. Noticed by Duncan Sands.
llvm-svn: 36132
2007-04-16 15:00:39 +00:00
Reid Spencer c6ee811cc2 Syntax upgrade and fix for PR1336.
llvm-svn: 36131
2007-04-16 14:46:17 +00:00
Reid Spencer f400745e7f Test case for PR1328.
llvm-svn: 36119
2007-04-16 06:52:21 +00:00
Reid Spencer e3dbe62579 For PR1336:
De-XFAIL tests now passing.

llvm-svn: 36097
2007-04-16 00:41:11 +00:00
Reid Spencer 6584cf60f2 For PR1336:
XFAIL tests covered by the PR. These will be un-XFAILed as they are fixed.

llvm-svn: 36093
2007-04-15 23:00:46 +00:00
Reid Spencer c6b30b107b For PR1319:
Upgrade to new Tcl exec based test framework. This exposes three regressions
in llvm-upgrade:
test/Assembler/2002-08-19-BytecodeReader.llx
test/Assembler/2003-08-21-ConstantExprCast-Fold.llx
test/Assembler/2004-01-11-getelementptrfolding.llx

llvm-svn: 36067
2007-04-15 10:07:55 +00:00
Reid Spencer d029c7e666 Make the llvm-runtest function much more amenable by eliminating all the
global variables that needed to be passed in. This makes it possible to
add new global variables with only a couple changes (Makefile and llvm-dg.exp)
instead of touching every single dg.exp file.

llvm-svn: 35918
2007-04-11 19:56:59 +00:00
Reid Spencer 3c401f0613 For PR1289:
Remove an unneeded instance of "implementation" that soon won't be supported.

llvm-svn: 35498
2007-03-30 01:35:32 +00:00
Reid Spencer b9d7f2a3ba checkpoint -> implementation. This really needs to just drop the need for
a keyword by having the assembler check for incomplete types and values
upon end-of-file.

llvm-svn: 35474
2007-03-29 18:56:58 +00:00
Reid Spencer 8cd7e8190b Delete the remanant of an obsolete comment.
llvm-svn: 35415
2007-03-28 03:23:22 +00:00
Reid Spencer 44259a29c0 Remove use of implementation keyword.
llvm-svn: 35412
2007-03-28 02:38:26 +00:00
Reid Spencer bad2921deb The implementation keyword was replaced with checkpoint.
llvm-svn: 35409
2007-03-28 02:34:53 +00:00
Reid Spencer 98f0709618 Break up huge line so that this file is almost readable.
llvm-svn: 35216
2007-03-20 17:27:19 +00:00
Reid Spencer 732f0a838e Test case noticed by Sheng that fails because negative values that are
greater than 64-bits don't have the sign bits extended on construction of
the APInt.

llvm-svn: 35178
2007-03-19 20:35:26 +00:00
Reid Spencer 37f629a953 For PR1258:
Test that invalid numbered value references get an error message.

llvm-svn: 35175
2007-03-19 18:41:37 +00:00
Reid Spencer dca9687de6 Test case for PR1256.
llvm-svn: 35110
2007-03-14 23:07:24 +00:00
Reid Spencer d958a2b2d8 New test cases for PR1187
llvm-svn: 34052
2007-02-08 09:10:22 +00:00
Reid Spencer 6dde337628 Make this legal input.
llvm-svn: 34051
2007-02-08 09:09:36 +00:00
Reid Spencer 19c3dea36f Add some more interesting cases to this test.
llvm-svn: 34042
2007-02-08 08:03:46 +00:00
Reid Spencer 530d2e3051 For PR1187:
Add some interesting CSRETCC upgrade cases.

llvm-svn: 34041
2007-02-08 06:45:02 +00:00
Reid Spencer 8ff9a0691c For PR1187:
Add a test to ensure that i1, i8, i16, i32 and i64 are recognized by the
lexer and vars using them will be renamed appropriately.

llvm-svn: 34019
2007-02-07 23:45:51 +00:00
Reid Spencer ba6d6fab20 For PR1187:
Add a test case to test rename of internal linkage functions with the same
name, without an error or warning.

llvm-svn: 34018
2007-02-07 23:41:10 +00:00
Reid Spencer 22507b4fbf Assembler no longer prints ! at the end of its error messages.
llvm-svn: 33908
2007-02-05 10:17:51 +00:00
Reid Spencer 2341c22ec7 Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.

llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Reid Spencer ccef5a35bf Update this test case to look for sret parameter attribute not csret cc.
llvm-svn: 33613
2007-01-29 05:40:02 +00:00
Reid Spencer 4be2853bfb Test case for PR1137. This makes sure that we don't get erroneous
"redefinition" errors that cause the upgrade to fail.

llvm-svn: 33593
2007-01-28 00:45:28 +00:00
Reid Spencer 23f1272d37 For PR1122:
Test the upgradability of nested type definitions.

llvm-svn: 33534
2007-01-26 08:44:14 +00:00
Reid Spencer ce380568b5 For PR761:
Remove "target endian/pointersize" or add "target datalayout" to make
the test parse properly or set the datalayout because defaults changes.

For PR645:
Make global names use the @ prefix.

For llvm-upgrade changes:
Fix test cases or completely remove use of llvm-upgrade for test cases
that cannot survive the new renaming or upgrade capabilities.

llvm-svn: 33533
2007-01-26 08:25:06 +00:00
Owen Anderson c709e5ee15 Fix incorrect run line.
llvm-svn: 33395
2007-01-20 08:48:05 +00:00
Reid Spencer 83b3d82672 Regression is gone, don't try to find it on clean target.
llvm-svn: 33296
2007-01-17 07:59:14 +00:00