Anton Korobeynikov
bdb4f560da
Fix PR1325: Case range optimization was performed in the case it
...
shouldn't. Also fix some "latent" bug on 64-bit platforms
llvm-svn: 35990
2007-04-14 13:25:55 +00:00
Duncan Sands
99bc2c31b3
Correct typo.
...
llvm-svn: 35989
2007-04-14 12:30:27 +00:00
Reid Spencer
424ebf9c39
Fix a missing -f that the new llvm.exp found.
...
llvm-svn: 35988
2007-04-14 09:45:16 +00:00
Reid Spencer
e44effb288
Fix a missing -f caught by the new llvm.exp script.
...
llvm-svn: 35987
2007-04-14 09:43:30 +00:00
Reid Spencer
90bdd23c2b
Initial version of a re-write of llvm-runtest that doesn't write the
...
tests to a script file but executes each line individually and catches
errors on each line too.
llvm-svn: 35986
2007-04-14 09:39:28 +00:00
Chris Lattner
6e71d21892
disable shift/and lowering to work around PR1325 for now.
...
llvm-svn: 35985
2007-04-14 02:26:56 +00:00
Chris Lattner
a283acb406
Implement a few missing xforms: printf("foo\n") -> puts. printf("x") -> putchar
...
printf("") -> noop. Still need to do the xforms for fprintf.
This implements Transforms/SimplifyLibCalls/Printf.ll
llvm-svn: 35984
2007-04-14 01:17:48 +00:00
Chris Lattner
3a22af9126
new testcase
...
llvm-svn: 35983
2007-04-14 01:17:38 +00:00
Chris Lattner
25f2c932b7
in addition to merging, constantmerge should also delete trivially dead globals,
...
in order to clean up after simplifylibcalls.
llvm-svn: 35982
2007-04-14 01:11:54 +00:00
Chris Lattner
6f64f54168
Implement PR1201 and test/Transforms/InstCombine/malloc-free-delete.ll
...
llvm-svn: 35981
2007-04-14 00:20:02 +00:00
Chris Lattner
1d90754cf7
testcase for PR1201
...
llvm-svn: 35980
2007-04-14 00:19:36 +00:00
Chris Lattner
b97ff21db2
use an accessor to simplify code.
...
llvm-svn: 35979
2007-04-14 00:17:39 +00:00
Chris Lattner
5ed58fc4a9
add GetElementPtrInst::hasAllZeroIndices, a long-overdue helper method.
...
Writing it twice in the same day was too much for me.
llvm-svn: 35978
2007-04-14 00:12:57 +00:00
Reid Spencer
84c2475e77
We want the number of bits needed, not the power of 2.
...
llvm-svn: 35977
2007-04-14 00:00:10 +00:00
Dale Johannesen
e7e6d863f4
tests for struct/union as input operands to asm.
...
llvm-svn: 35976
2007-04-13 22:54:11 +00:00
Jeff Cohen
3ffd34cac6
Silence VC++ warning.
...
llvm-svn: 35975
2007-04-13 22:52:03 +00:00
Reid Spencer
5263c69f0d
Add the SCCP regression tests for APInt expressions. These test cases
...
turned up some regressions that have since been fixed. We don't want to
loose the regression tests.
Test cases by Guoling Han.
llvm-svn: 35974
2007-04-13 22:33:10 +00:00
Chris Lattner
cbe92494fd
xfail this for now
...
llvm-svn: 35973
2007-04-13 22:20:27 +00:00
Chris Lattner
8477dd1722
Now that codegen prepare isn't defeating me, I can finally fix what I set
...
out to do! :)
This fixes a problem where LSR would insert a bunch of code into each MBB
that uses a particular subexpression (e.g. IV+base+C). The problem is that
this code cannot be CSE'd back together if inserted into different blocks.
This patch changes LSR to attempt to insert a single copy of this code and
share it, allowing codegenprepare to duplicate the code if it can be sunk
into various addressing modes. On CodeGen/ARM/lsr-code-insertion.ll,
for example, this gives us code like:
add r8, r0, r5
str r6, [r8, #+4]
..
ble LBB1_4 @cond_next
LBB1_3: @cond_true
str r10, [r8, #+4]
LBB1_4: @cond_next
...
LBB1_5: @cond_true55
ldr r6, LCPI1_1
str r6, [r8, #+4]
instead of:
add r10, r0, r6
str r8, [r10, #+4]
...
ble LBB1_4 @cond_next
LBB1_3: @cond_true
add r8, r0, r6
str r10, [r8, #+4]
LBB1_4: @cond_next
...
LBB1_5: @cond_true55
add r8, r0, r6
ldr r10, LCPI1_1
str r10, [r8, #+4]
Besides being smaller and more efficient, this makes it immediately
obvious that it is profitable to predicate LBB1_3 now :)
llvm-svn: 35972
2007-04-13 20:42:26 +00:00
Chris Lattner
ef78f89fa5
new lsr testcase
...
llvm-svn: 35971
2007-04-13 20:38:14 +00:00
Chris Lattner
bc03b6c341
Completely rewrite addressing-mode related sinking of code. In particular,
...
this fixes problems where codegenprepare would sink expressions into load/stores
that are not valid, and fixes cases where it would miss important valid ones.
This fixes several serious codesize and perf issues, particularly on targets
with complex addressing modes like arm and x86. For example, now we compile
CodeGen/X86/isel-sink.ll to:
_test:
movl 8(%esp), %eax
movl 4(%esp), %ecx
cmpl $1233, %eax
ja LBB1_2 #F
LBB1_1: #T
movl $4, (%ecx,%eax,4)
movl $141, %eax
ret
LBB1_2: #F
movl (%ecx,%eax,4), %eax
ret
instead of:
_test:
movl 8(%esp), %eax
leal (,%eax,4), %ecx
addl 4(%esp), %ecx
cmpl $1233, %eax
ja LBB1_2 #F
LBB1_1: #T
movl $4, (%ecx)
movl $141, %eax
ret
LBB1_2: #F
movl (%ecx), %eax
ret
llvm-svn: 35970
2007-04-13 20:30:56 +00:00
Chris Lattner
c65c4e9916
New testcase
...
llvm-svn: 35969
2007-04-13 20:28:08 +00:00
Reid Spencer
6e7854339e
Implement a getBitsNeeded method to determine how many bits are needed to
...
represent a string in binary form by an APInt.
llvm-svn: 35968
2007-04-13 19:19:07 +00:00
Devang Patel
d86d04983a
Remove use of SlowOperationInformer.
...
llvm-svn: 35967
2007-04-13 18:58:18 +00:00
Devang Patel
d01bb17f76
Undo previous check-in.
...
llvm-svn: 35966
2007-04-13 18:35:15 +00:00
Devang Patel
bfd8480bad
Hello uses LLVMSupport.a (SlowerOperationInformer)
...
llvm-svn: 35965
2007-04-13 18:28:23 +00:00
Dan Gohman
2d4b1767ab
Rename Value::getValueType to getValueID, to avoid confusion with
...
other things named getValueType.
llvm-svn: 35964
2007-04-13 18:12:09 +00:00
Anton Korobeynikov
5bb6590218
Fix PR1323 : we haven't updated phi nodes in good manner :)
...
llvm-svn: 35963
2007-04-13 06:53:51 +00:00
Chris Lattner
e7cab7b7a4
arm has r+r*s and r+i addr modes, but no r+i+r*s addr modes.
...
llvm-svn: 35962
2007-04-13 06:50:55 +00:00
Zhou Sheng
dedfc40044
Make the apint construction more effective.
...
llvm-svn: 35960
2007-04-13 05:57:32 +00:00
Chris Lattner
335f1cb1f8
CSE simple binary expressions when they are inserted. This makes LSR produce
...
less huge code that needs to be cleaned up by sdisel.
llvm-svn: 35959
2007-04-13 05:04:18 +00:00
Tanya Lattner
425b614986
Adding target triplet to be passed to database.
...
llvm-svn: 35958
2007-04-13 04:36:48 +00:00
Reid Spencer
d31093d340
Implement review feedback .. don't double search a set.
...
llvm-svn: 35957
2007-04-12 21:57:15 +00:00
Reid Spencer
f1154e6d96
Make sure intrinsics that are lowered to functions make the function weak
...
linkage so we only end up with one of them in a program. These are, after
all overloaded and templatish in nature.
llvm-svn: 35956
2007-04-12 21:53:38 +00:00
Dale Johannesen
37aecc68ea
testcases for function linkage
...
llvm-svn: 35955
2007-04-12 21:01:53 +00:00
Reid Spencer
0325471d3c
Provide support for intrinsics that lower themselves to a function body.
...
This can happen for intrinsics that are overloaded. In such cases it is
necessary to emit a function prototype before the body of the function
that calls the intrinsic and to ensure we don't emit it multiple times.
llvm-svn: 35954
2007-04-12 21:00:45 +00:00
Lauro Ramos Venancio
000b6f4d9b
update documentation
...
llvm-svn: 35953
2007-04-12 20:34:36 +00:00
Lauro Ramos Venancio
acea6ac5ca
update documentation
...
llvm-svn: 35952
2007-04-12 19:52:46 +00:00
Lauro Ramos Venancio
6c5f53f6ac
Implement Thread Local Storage (TLS) in CBackend.
...
llvm-svn: 35951
2007-04-12 18:42:08 +00:00
Lauro Ramos Venancio
a76c2806de
Implement the "thread_local" keyword.
...
llvm-svn: 35950
2007-04-12 18:32:50 +00:00
Chris Lattner
ba8ff05529
vector compares aren't allowed. It doesn't make sense to have an xfailed
...
test to remind us of this.
llvm-svn: 35949
2007-04-12 18:21:52 +00:00
Chris Lattner
ee73b503a4
make this really work on linux :)
...
llvm-svn: 35948
2007-04-12 18:10:16 +00:00
Chris Lattner
62374cc05e
make this happier on linux hosts
...
llvm-svn: 35947
2007-04-12 18:09:06 +00:00
Reid Spencer
1e53c865c2
Fix bugs in generated code for part_select and part_set so that llc doesn't
...
barf when CBE is run with a program that contains these intrinsics.
llvm-svn: 35946
2007-04-12 13:30:14 +00:00
Reid Spencer
76e9a17f61
Fix a bug in PartSet. The replacement value needs to be zext or trunc to
...
the size of the value, not just zext. Also, give better names to two BBs.
llvm-svn: 35945
2007-04-12 12:46:33 +00:00
Chris Lattner
0da8de5848
the result of an inline asm copy can be an arbitrary VT that the register
...
class supports. In the case of vectors, this means we often get the wrong
type (e.g. we get v4f32 instead of v8i16). Make sure to convert the vector
result to the right type. This fixes CodeGen/X86/2007-04-11-InlineAsmVectorResult.ll
llvm-svn: 35944
2007-04-12 06:00:20 +00:00
Chris Lattner
7acaf64d70
fold noop vbitconvert instructions
...
llvm-svn: 35943
2007-04-12 05:58:43 +00:00
Chris Lattner
e3db14f830
new testcase
...
llvm-svn: 35942
2007-04-12 05:58:21 +00:00
Chris Lattner
2f221a83ec
Fix weirdness handling single element vectors.
...
llvm-svn: 35941
2007-04-12 04:44:28 +00:00
Chris Lattner
2b6b79b896
Fix mmx paddq, add support for the 'y' register class, though it isn't tested.
...
llvm-svn: 35940
2007-04-12 04:14:49 +00:00