summaryrefslogtreecommitdiff
path: root/test/Assembler
Commit message (Collapse)AuthorAge
...
* fix parsing of mdstring values.Chris Lattner2009-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92290 91177308-0d34-0410-b5e6-96231b3b80d8
* Each instruction is allowed to have *multiple* different Chris Lattner2009-12-29
| | | | | | | | metadata objects on them. Though the entire compiler supports this, the asmparser didn't. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92270 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not crash when .ll printing metadata that smells like debug info, but isn't.Chris Lattner2009-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92268 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust testcases for msasm -> alignstack.Dale Johannesen2009-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84796 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an "msasm" flag to inline asm as suggested in PR 5125.Dale Johannesen2009-10-13
| | | | | | | | | A little ugliness is accepted to keep the binary file format compatible. No functional change yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84020 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the usage of evaluateICmpRelation's return value.Nick Lewycky2009-09-20
| | | | | | | | Add another line to the ConstantExprFold test to demonstrate the GEPs may not wrap around in either the signed or unsigned senses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82361 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR4963: folding insertvalue would sometimes turn a packed struct intoChris Lattner2009-09-15
| | | | | | | an unpacked one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81845 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this test to test what it was originally intended to test.Dan Gohman2009-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81539 91177308-0d34-0410-b5e6-96231b3b80d8
* Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2009-09-11
| | | | | | | | | input filename so that opt doesn't print the input filename in the output so that grep lines in the tests don't unintentionally match strings in the input filename. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81537 91177308-0d34-0410-b5e6-96231b3b80d8
* fix test to not get a moduleid that matches 'br'Chris Lattner2009-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81526 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach lib/VMCore/ConstantFold.cpp how to set the inbounds keyword andDan Gohman2009-09-11
| | | | | | | | | | | | | | how to fold notionally-out-of-bounds array getelementptr indices instead of just doing these in lib/Analysis/ConstantFolding.cpp, because it can be done in a fairly general way without TargetData, and because not all constants are visited by lib/Analysis/ConstantFolding.cpp. This enables more constant folding. Also, set the "inbounds" flag when the getelementptr indices are one-past-the-end. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81483 91177308-0d34-0410-b5e6-96231b3b80d8
* Use opt -S instead of piping bitcode output through llvm-dis.Dan Gohman2009-09-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81257 91177308-0d34-0410-b5e6-96231b3b80d8
* Change these tests to feed the assembly files to opt directly, insteadDan Gohman2009-09-08
| | | | | | | of using llvm-as, now that opt supports this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81226 91177308-0d34-0410-b5e6-96231b3b80d8
* Reappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.Dan Gohman2009-09-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81172 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Include optional subclass flags, such as inbounds, nsw, etc., ...", thisDaniel Dunbar2009-09-06
| | | | | | breaks MiniSAT on x86_64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81098 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spacing.Daniel Dunbar2009-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81097 91177308-0d34-0410-b5e6-96231b3b80d8
* Include optional subclass flags, such as inbounds, nsw, etc., in theDan Gohman2009-09-04
| | | | | | | | | | | | | | | | | | Constant uniquing tables. This allows distinct ConstantExpr objects with the same operation and different flags. Even though a ConstantExpr "a + b" is either always overflowing or never overflowing (due to being a ConstantExpr), it's still necessary to be able to represent it both with and without overflow flags at the same time within the IR, because the safety of the flag may depend on the context of the use. If the constant really does overflow, it wouldn't ever be safe to use with the flag set, however the use may be in code that is never actually executed. This also makes it possible to merge all the flags tests into a single test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80998 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove obsolete -f flags.Dan Gohman2009-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79992 91177308-0d34-0410-b5e6-96231b3b80d8
* Various AsmWriter output cleanups. Use WriteAsOperand instead ofDan Gohman2009-08-13
| | | | | | | PrintUnmangledNameSafely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78878 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the AsmWriter to print unnamed numbered types as "%0 = type ..."Dan Gohman2009-08-12
| | | | | | | | and unnamed numbered global variables as "@0 = global ...". Extend the AsmParser to recognize these forms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78859 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new keyword 'inbounds' for use with getelementptr. See theDan Gohman2009-07-27
| | | | | | | LangRef.html changes for details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77259 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the assembly syntax for nsw, nuw, and exact, putting themDan Gohman2009-07-27
| | | | | | | | after their associated opcodes rather than before. This makes them a little easier to read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77194 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix assert assembling zero-argument constant GEP.Eli Friedman2009-07-24
| | | | | | | | | There's still a strict-aliasing violation here, but I don't feel like dealing with that right now... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77005 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the new unsigned and signed keywords to nuw and nsw,Dan Gohman2009-07-22
| | | | | | | which stand for no-unsigned-wrap and no-signed-wrap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76810 91177308-0d34-0410-b5e6-96231b3b80d8
* Assembly and Bitcode support for unsigned/signed overflow flags andDan Gohman2009-07-20
| | | | | | | exact sdiv flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76475 91177308-0d34-0410-b5e6-96231b3b80d8
* Apparently Darwin doesn't have /dev/full :-(.Dan Gohman2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75809 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a testcase for raw_ostream error checking.Dan Gohman2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75795 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky2009-07-08
| | | | | | | | these instructions, no autoupgrade or backwards compatibility support is provided. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74991 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-04
| | | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert this. There's no way to verifiy indirect calls, and an optimizer can turnTorok Edwin2009-05-22
| | | | | | | | indirect call into direct call, thus the verifier would reject something it previously accepted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72249 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify that calling conventions match function prototype.Torok Edwin2009-05-22
| | | | | | | | | | This only rejects mismatches between target specific calling convention and C/LLVM specific calling convention. There are too many fastcc/C, coldcc/cc42 mismatches in the testsuite, these are not reject by the verifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72248 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this test slightly more strict.Dan Gohman2009-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70180 91177308-0d34-0410-b5e6-96231b3b80d8
* Any size of integral indices are allowed in gep for indexing into sequential ↵Sanjiv Gupta2009-04-26
| | | | | | types. Also adding a test case to check the indices type allowed into struct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70134 91177308-0d34-0410-b5e6-96231b3b80d8
* add testcase for strange types of gep indicesChris Lattner2009-04-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70085 91177308-0d34-0410-b5e6-96231b3b80d8
* testcase and asmparser fix for PR4066Chris Lattner2009-04-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70080 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix g++-4.4.0 warning, it was causing llvm-nm to fail on wrapped BC files:Torok Edwin2009-04-25
| | | | | | | | | | | | | | Path.cpp:59: warning: case label value exceeds maximum value for type magic[0] is a (signed) char, but some case values are unsigned (e.g. 0xde). When magic[0] was 0xde, the switch has taken the default branch instead of case 0xde branch. Apparently this was the behaviour with older versions of gcc too, but not with g++. Now g++-4.4 behaves as gcc, and ignores unsigned case values out of range signed range. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70038 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in our autoupgrade support: in an argument list to a functionChris Lattner2009-03-25
| | | | | | | | | | | | | | call, we should treat "i64 zext" as the start of a constant expr, but "i64 0 zext" as an argument with an obsolete attribute on it (this form is already tested by test/Assembler/2007-07-30-AutoUpgradeZextSext.ll). Make the autoupgrade logic more discerning to avoid treating "i64 zext" as an old-style attribute, causing us to reject a valid constant expr. This fixes PR3876. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67682 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply a patch by Micah Villmow to fix AsmParser to accept vectorDan Gohman2009-03-14
| | | | | | | | shift constant expressions, and add support for folding vector shift constant expressions. This fixes PR3802. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67010 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a pretty awesome bug that only happened in a strange case with anonymousChris Lattner2009-03-01
| | | | | | | types. This was reading the uint for the keyword after the token was advanced. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65743 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a long-standing bug and misfeature of the disassembler: when dealing with a Chris Lattner2009-03-01
| | | | | | | | | | | | | | | stripped .bc file, it didn't make any attempt to try to reuse anonymous types. This causes an amazing type explosion due to types getting duplicated everywhere they are referenced and other problems. This also caused correctness issues, because opaque types are unique for each time they are uttered in the file. This means that stripping a .bc file could produce a .ll file that could not be assembled (e.g. 2009-02-28-StripOpaqueName.ll). This patch fixes both of these issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65738 91177308-0d34-0410-b5e6-96231b3b80d8
* add proper asmwriter and asmparser support for anonymous functions.Chris Lattner2009-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64953 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove now-incorrect test.Nate Begeman2009-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63772 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR3372Chris Lattner2009-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63501 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the private linkage.Rafael Espindola2009-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
* this testcase is huge and hasn't regressed ever, I don't think it is worth ↵Chris Lattner2009-01-08
| | | | | | keeping. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61931 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't spew bitcode to standard out if this testDuncan Sands2009-01-05
| | | | | | | fails, like it is right now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61690 91177308-0d34-0410-b5e6-96231b3b80d8
* Reimplement the old and horrible bison parser for .ll files with a niceChris Lattner2009-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and clean recursive descent parser. This change has a couple of ramifications: 1. The parser code is about 400 lines shorter (in what we maintain, not including what is autogenerated). 2. The code should be significantly faster than the old code because we don't have to work around bison's poor handling of datatypes with ctors/dtors. This also makes the code much more resistant to memory leaks. 3. We now get caret diagnostics from the .ll parser, woo. 4. The actual diagnostics emited from the parser are completely different so a bunch of testcases had to be updated. 5. I now disallow "%ty = type opaque %ty = type i32". There was no good reason to support this, it was just an accident of the old implementation. I have no reason to think that anyone is actually using this. 6. The syntax for sticking a global variable has changed to make it unambiguous. I don't think anyone is depending on this since only clang supports this and it is not solid yet, so I'm not worried about anything breaking. 7. This gets rid of the last use of bison, and along with it the .cvs files. I'll prune this from the makefiles as a subsequent commit. There are a few minor cleanups that can be done after this commit (suggestions welcome!) but this passes dejagnu testing and is ready for its time in the limelight. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61558 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the .ll grammar rules to allow any type before an 'i32', not just anChris Lattner2008-10-15
| | | | | | | | integer type. Invalid things like 'float 42' are now rejected by the semantic analysis in the productions not the parser. This fixes PR2733. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57560 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent assert when using '"' in names (via hexadecimal).Daniel Dunbar2008-10-14
| | | | | | | Update LangRef to mention \xx quoting in names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57538 91177308-0d34-0410-b5e6-96231b3b80d8
* Attributes noinline alwaysinline are incompatibleDevang Patel2008-10-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56939 91177308-0d34-0410-b5e6-96231b3b80d8