Chris Lattner
edf6a84a75
Add new testcase for gep instruction -> get constexpr promotion
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3364 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-16 21:18:21 +00:00
Chris Lattner
1c93e5bd26
Changed parser to always use parenthesis on ConstExprs to be consistent
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3363 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-16 21:17:11 +00:00
Chris Lattner
d78700de8e
- Remove unused STRING token from lexer & parser
...
- Changed parser to always use parenthesis on ConstExprs to be consistent
- Parser now passes TRUE and FALSE tokens as a special case of the ConstExpr
machinery instead of a special case of constant int stuff
- Fix the AsmParser to use ValueRef ::= ConstExpr, and remove
ResolvedVal ::= ConstExpr this allows constexprs to be used in PHI nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3362 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-16 21:14:40 +00:00
Chris Lattner
750b9b080d
Fix typo
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3361 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-16 19:34:33 +00:00
Chris Lattner
a9c677e41b
New testcase distilled from much larger problem
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3360 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-16 16:54:52 +00:00
Chris Lattner
85907a64c2
Convert constexpr over to new syntax
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3359 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 21:14:39 +00:00
Chris Lattner
81003a4cc4
New testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3358 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 21:08:38 +00:00
Chris Lattner
d1c58ac7c3
Make 'features' testsuite work with the /shared changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3357 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 19:49:06 +00:00
Chris Lattner
83a278efad
Convert testcase to use correct syntax
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3356 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 19:48:48 +00:00
Chris Lattner
9edfe8aa18
Add another testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3355 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 19:38:03 +00:00
Chris Lattner
95586b8c83
Write constexpr casts using the cast X to Y notation, not using the implicit
...
type result
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3354 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 19:37:43 +00:00
Chris Lattner
ec1b8a0796
Parse const expr cast instruction the same way the instruction is formed
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3353 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 19:37:11 +00:00
Chris Lattner
2b4dcbb91d
Add a note mentioning that bools promote to 0 or 1
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3352 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 19:36:05 +00:00
Chris Lattner
d05e359b10
Move ConstExpr production to unify ConstVal stuff
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3351 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 18:17:28 +00:00
Chris Lattner
3101c25293
Fix bug: test/Regression/Assembler/2002-08-15-UnresolvedGlobalReference.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3350 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 17:58:33 +00:00
Chris Lattner
657882cf6e
There seem to be issues with constant exprs
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3349 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 17:04:40 +00:00
Chris Lattner
96ad1ec876
Simplify the code
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3348 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 16:15:36 +00:00
Chris Lattner
3ecce66e25
Handle more cases of cast-of-cast in more general forms.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3347 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 16:15:25 +00:00
Chris Lattner
c5b74477c0
Remove the last traces of the NOT instruction
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3346 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 16:14:49 +00:00
Chris Lattner
8decbcbbfe
Add a bunch of testcases for cast-of-casts that should be removed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3345 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 16:13:29 +00:00
Vikram S. Adve
917d551969
Change opLabel numbers for Not and BNot.
...
Also, these tree nodes are now binary, not unary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3344 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 14:20:45 +00:00
Vikram S. Adve
85af131d9e
Unary Not (boolean and bitwise) is no longer a separate LLVM instruction
...
but is instead implemented with XOR. Note that the InstrForest opLabels
for Not and BNot remain the same, i.e., the XOR is recognized and
represented as a (boolean or bitwise) Not when building the instruction
trees. But these tree nodes are now binary, not unary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3343 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 14:19:22 +00:00
Vikram S. Adve
ce08e1dd3e
Revise code generation for unary Not (boolean and bitwise), which is
...
no longer a separate instruction but is instead implemented with XOR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3342 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 14:17:37 +00:00
Vikram S. Adve
1718337cf7
Added more helper functions for binary instructions emulating
...
unary Neg and Not: isNeg, isNot, getNegArgument, and getNotArgument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3341 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 14:15:48 +00:00
Vikram S. Adve
0f63e22e84
Add tests for unary NOT operations.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3340 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-15 14:09:56 +00:00
Chris Lattner
5cf6f112e6
Implement capability to fold this:
...
uint %test4(int %A, int %B) {
%COND = setlt int %A, %B ; <bool> [#uses=1]
%result = cast bool %COND to uint ; <uint> [#uses=1]
ret uint %result
}
into a single cast instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3339 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 23:21:10 +00:00
Chris Lattner
8360d0922a
Fix testcase to actually test what we think we are
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3338 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 23:01:19 +00:00
Chris Lattner
b9a7793ecb
Avoid creating 'load X, 0' instead of just 'load X'
...
This _trivial_ change causes GCSE and LICM to be much more effective at
hoisting loads. Before it would not be able to eliminate 'load X' if there
was just a dominating 'load X, 0' because the expressions were not identical.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3337 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 22:11:52 +00:00
Chris Lattner
db6e4d6625
Avoid inserting an entry block unless we need it
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3336 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 21:35:02 +00:00
Chris Lattner
7ce83e576a
Gross, some whitespace escaped
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3335 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 20:07:01 +00:00
Chris Lattner
17a4c3ecfb
Fix bug in documentation
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3334 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 20:06:13 +00:00
Chris Lattner
d022471260
*** empty log message ***
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 19:29:38 +00:00
Chris Lattner
a939a1e664
This file does not belong here.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3332 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 19:29:32 +00:00
Chris Lattner
f39c24cbeb
Fix tests that use the now dead not instruction
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3331 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 19:28:22 +00:00
Chris Lattner
985792d870
Fix testcases that used to now dead 'not' instruction
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3330 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 19:28:09 +00:00
Chris Lattner
d0cad7a5f5
Change not's to xors
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3329 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 19:26:34 +00:00
Chris Lattner
ad333484ea
Remove support for Not ConstantExpr. This simplifies the unary case to only
...
have to support the cast instruction, so the function is renamed to getCast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3328 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 18:24:09 +00:00
Chris Lattner
9b2b80fd48
Fix bug introduced in last checkin due to CastInst not being visible
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3327 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 18:22:19 +00:00
Chris Lattner
9c16dba29f
Remove support for unary operators.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3326 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 18:19:46 +00:00
Chris Lattner
935bb0d071
Remove reference to GenericUnaryInst class
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3325 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 18:18:50 +00:00
Chris Lattner
30551d02f5
Remove support for unary instructions
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3324 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 18:18:28 +00:00
Chris Lattner
0513e9fe03
Remove support for NOT instruction
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3323 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 18:18:02 +00:00
Chris Lattner
48a4531ee4
Remove extra #includes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3322 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 18:17:32 +00:00
Chris Lattner
f4e3c006ac
Remove constant propogation support for NOT instruction
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3321 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 18:17:07 +00:00
Chris Lattner
20e8e01c5d
Remove support for NOT instruction
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3320 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 18:00:52 +00:00
Chris Lattner
e489aa563c
Remove information about dead 'not' instruction
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3319 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 17:55:59 +00:00
Chris Lattner
b804760b56
Remove support for unary operators
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3318 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 17:53:45 +00:00
Chris Lattner
a9261ff5b7
Implement two constructor functions for "unary" instructions
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3317 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 17:52:27 +00:00
Chris Lattner
589fda514c
Remove support forNOT instruction
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3316 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 17:52:06 +00:00
Chris Lattner
af2930efa0
- Fix InstCombine pass to not generate or process NOT instructions
...
- Fixed testcases to not use them either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3315 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-14 17:51:49 +00:00