Dan Gohman
eb622df2ef
Fix several more entries in the x86 reload/remat folding tables.
...
llvm-svn: 42162
2007-09-20 14:17:21 +00:00
Nick Lewycky
9edfec9b3c
Excuse me.
...
llvm-svn: 42158
2007-09-20 00:57:00 +00:00
Nick Lewycky
3baa4cde1c
Fix optimization. %x = sub %x, %y does not imply that %y is zero.
...
llvm-svn: 42157
2007-09-20 00:48:36 +00:00
Devang Patel
648d7a1074
Avoid unsafe promotion.
...
llvm-svn: 42149
2007-09-19 20:18:51 +00:00
Duncan Sands
159524a84f
Testcase for PR1678.
...
llvm-svn: 42128
2007-09-19 07:43:17 +00:00
Evan Cheng
28a7839505
Clean up.
...
llvm-svn: 42112
2007-09-18 22:56:31 +00:00
Evan Cheng
2716b97b13
Fix a bogus splat xform:
...
shuffle <undef, undef, x, undef>, <undef, undef, undef, undef>, <2, 2, 2, 2>
!=
<undef, undef, x, undef>
llvm-svn: 42111
2007-09-18 21:54:37 +00:00
Gabor Greif
fd6f1faeeb
rename test, it is obviously misspelled
...
llvm-svn: 42108
2007-09-18 21:42:39 +00:00
Gordon Henriksen
9deea8ed1a
Tests of the ocaml (and thus C) bindings for constants.
...
llvm-svn: 42101
2007-09-18 18:07:51 +00:00
Gordon Henriksen
29fe360b5a
Adding ocaml language bindings for the vmcore and bitwriter libraries. These are
...
built atop the C language bindings, and user programs can link with them as
such:
# Bytecode
ocamlc -cc g++ llvm.cma llvmbitwriter.cma -o example example.ml
# Native
ocamlopt -cc g++ llvm.cmxa llvmbitwriter.cmxa -o example.opt example.ml
The vmcore.ml test exercises most/all of the APIs thus far bound. Unfortunately,
they're not yet numerous enough to write hello world. But:
$ cat example.ml
(* example.ml *)
open Llvm
open Llvm_bitwriter
let _ =
let filename = Sys.argv.(1) in
let m = create_module filename in
let v = make_int_constant i32_type 42 false in
let g = define_global "hello_world" v m in
if not (write_bitcode_file m filename) then exit 1;
dispose_module m;
$ ocamlc -cc g++ llvm.cma llvm_bitwriter.cma -o example example.ml
File "example.ml", line 11, characters 6-7:
Warning Y: unused variable g.
$ ./example example.bc
$ llvm-dis < example.bc
; ModuleID = '<stdin>'
@hello_world = global i32 42 ; <i32*> [#uses=0]
The ocaml test cases provide effective tests for the C interfaces.
llvm-svn: 42093
2007-09-18 12:49:39 +00:00
Gordon Henriksen
a8db66a37a
(no commit message)
...
llvm-svn: 42090
2007-09-18 12:26:17 +00:00
Devang Patel
4014965efb
Fix PR1657
...
llvm-svn: 42075
2007-09-18 01:54:42 +00:00
Bill Wendling
803e0d9970
Objective-C was generating EH frame info like this:
...
"_-[NSString(local) isNullOrNil]".eh = 0
.no_dead_strip "_-[NSString(local) isNullOrNil]".eh
The ".eh" should be inside the quotes.
llvm-svn: 42074
2007-09-18 01:47:22 +00:00
Gordon Henriksen
fa3a5915b1
Fix for PR1633: Verifier doesn't fully verify GC intrinsics
...
LLVM now enforces the following prototypes for the write barriers:
<ty>* @llvm.gcread(<ty2>*, <ty>**)
void @llvm.gcwrite(<ty>*, <ty2>*, <ty>**)
And for @llvm.gcroot, the first stack slot is verified to be an alloca or a
bitcast of an alloca.
Fixes test/CodeGen/Generic/GC/lower_gcroot.ll, which violated these.
llvm-svn: 42051
2007-09-17 20:30:04 +00:00
Dan Gohman
2de5779a99
Instcombine x-((x/y)*y) into a remainder operator.
...
llvm-svn: 42035
2007-09-17 17:31:57 +00:00
Dan Gohman
1aeaeec570
Emit integer x<1 as x<=0, as comparisons with zero (now includeing
...
64-bit) can use test instead of cmp with an immediate.
llvm-svn: 42026
2007-09-17 14:49:27 +00:00
Dan Gohman
b9449c9118
Use "test reg,reg" in place of "cmp reg,0" for 64-bit operands. This was
...
previously only done for 32-bit and smaller operands.
llvm-svn: 42024
2007-09-17 14:35:24 +00:00
Chris Lattner
890c3898e0
remove obsolete tests.
...
llvm-svn: 41984
2007-09-15 17:38:04 +00:00
Chris Lattner
489e7aa85f
New testcase for PR1662. GCC trees are horrible :(
...
llvm-svn: 41979
2007-09-15 05:46:41 +00:00
Dan Gohman
27ab14af9b
Add explicit triples to avoid default behavior that varies by host.
...
llvm-svn: 41959
2007-09-14 20:37:18 +00:00
Rafael Espindola
5d8b225881
Add support for functions with byval arguments on x86
...
llvm-svn: 41953
2007-09-14 15:48:13 +00:00
Evan Cheng
0d738fff6d
Fixed a typo that's causing a missing kill marker.
...
llvm-svn: 41893
2007-09-12 23:02:04 +00:00
Evan Cheng
b9a6798216
Sometimes a MI can define a register as well as defining a super-register at the
...
same time. Do not mark the "smaller" def as dead.
llvm-svn: 41871
2007-09-11 22:34:47 +00:00
Anton Korobeynikov
ed40962dc3
Fix date :)
...
llvm-svn: 41870
2007-09-11 22:20:27 +00:00
Anton Korobeynikov
c8ca85bf8f
Testcase for recent pragma pack stuff
...
llvm-svn: 41869
2007-09-11 22:12:26 +00:00
Duncan Sands
c99bc3e76f
Test that a call to a trampoline is turned into a call to
...
the underlying nested function.
llvm-svn: 41846
2007-09-11 15:07:50 +00:00
Chris Lattner
93ddf1dd70
Testcase for PR1634
...
llvm-svn: 41824
2007-09-11 00:39:43 +00:00
Chris Lattner
fe8bd8b113
remove obsolete testcase
...
llvm-svn: 41820
2007-09-10 23:51:41 +00:00
Chris Lattner
f08a077fa9
Fix a buggy constant folding transformation when handling aliases.
...
llvm-svn: 41818
2007-09-10 23:42:42 +00:00
Chris Lattner
c94e3e9361
Fix PR1645 by resolving forward alias references.
...
llvm-svn: 41815
2007-09-10 23:23:53 +00:00
Dale Johannesen
e017870ae6
Add missing llvm-dis.
...
llvm-svn: 41813
2007-09-10 22:47:59 +00:00
Chris Lattner
5fd9bec89d
this is not infinite recursion.
...
llvm-svn: 41806
2007-09-10 21:16:23 +00:00
Chris Lattner
ab8aa7d61a
Prevent tailcallelim from breaking "recursive" calls to builtins.
...
llvm-svn: 41804
2007-09-10 20:58:55 +00:00
Devang Patel
76790c1b28
Filter exit conditions which are not yet handled.
...
llvm-svn: 41800
2007-09-10 18:33:42 +00:00
Devang Patel
952baa25c2
New test.
...
llvm-svn: 41799
2007-09-10 18:12:52 +00:00
Dale Johannesen
9dfdc452d9
Implement misaligned FP loads and stores.
...
llvm-svn: 41786
2007-09-08 19:29:23 +00:00
Bill Wendling
04a6163921
Add missing index versions of instructions to the map.
...
llvm-svn: 41776
2007-09-07 22:01:02 +00:00
Dan Gohman
3bc1bc2590
Avoid storing and reloading zeros and other constants from stack slots
...
by flagging the associated instructions as being trivially rematerializable.
llvm-svn: 41775
2007-09-07 21:32:51 +00:00
Rafael Espindola
8c57e70f93
Add support for having different alignment for objects on call frames.
...
The x86-64 ABI states that objects passed on the stack have
8 byte alignment. Implement that.
llvm-svn: 41768
2007-09-07 14:52:14 +00:00
Anton Korobeynikov
899c0c9c8d
Split eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is needed, because they just "mark" register
...
liveins and we let frontend solve type issue, not lowering code :)
llvm-svn: 41763
2007-09-07 11:39:35 +00:00
Bill Wendling
538f8f9d7f
Test for PR1641.
...
llvm-svn: 41762
2007-09-07 08:30:09 +00:00
Chris Lattner
8e6c39d961
Don't zap back to back volatile load/stores
...
llvm-svn: 41759
2007-09-07 05:33:03 +00:00
Anton Korobeynikov
0e3789f07a
Proper handle case, when aliasee is external weak symbol referenced only by alias itself.
...
Also, fix a case, when target doesn't have weak symbols supported.
llvm-svn: 41746
2007-09-06 17:21:48 +00:00
Nick Lewycky
2f66503c0a
When the two operands of an icmp are equal, there are five possible predicates
...
that would make the icmp true. Fixes PR1637.
llvm-svn: 41740
2007-09-06 01:10:22 +00:00
Evan Cheng
896c1ed385
Fix a bug in X86InstrInfo::convertToThreeAddress that caused it to codegen:
...
leal (,%rcx,8), %rcx
It should be
leal (,%rcx,8), %ecx
llvm-svn: 41735
2007-09-06 00:14:41 +00:00
Dale Johannesen
f9ca7b6094
Change all floating constants that are not exactly
...
representable to use hex format.
llvm-svn: 41722
2007-09-05 17:50:36 +00:00
Duncan Sands
2e32997f97
Testcases for PR1628.
...
llvm-svn: 41719
2007-09-05 11:53:04 +00:00
Bill Wendling
13549db795
Add the 64-bit versions of the DS* Altivec instructions.
...
llvm-svn: 41717
2007-09-05 04:05:20 +00:00
Evan Cheng
bb21883dd3
Fix for PR1632. EHSELECTION always produces a i32 value.
...
llvm-svn: 41712
2007-09-04 20:39:26 +00:00
Evan Cheng
02c6081f2d
Fix for PR1613: added 64-bit rotate left PPC instructions and patterns.
...
llvm-svn: 41711
2007-09-04 20:20:29 +00:00