Commit Graph

449 Commits

Author SHA1 Message Date
Evan Cheng 9ad6edf2ec May need to promote the operand (either sign_extend_inreg or and) before
expanding a {s|u}int_to_fp.

llvm-svn: 32665
2006-12-19 01:44:04 +00:00
Evan Cheng adc80f98cf LegalizeSetCCOperands() may end up inserting libcalls. They need to be
properly serialized. Do not clear LastCallSEQ_END until that is done.

llvm-svn: 32659
2006-12-18 22:55:34 +00:00
Evan Cheng 851e589eda Expand FP undef
llvm-svn: 32623
2006-12-16 02:20:50 +00:00
Evan Cheng 860004688a Allow promoted FP_TO_UINT / FP_TO_SINT to expand operand.
llvm-svn: 32621
2006-12-16 02:10:30 +00:00
Evan Cheng 388cbbf000 Expand fabs / fneg to and / xor.
llvm-svn: 32619
2006-12-16 00:52:40 +00:00
Evan Cheng 884bc09d10 Fix select_cc, select expansion to soft-fp bugs.
llvm-svn: 32616
2006-12-15 22:42:55 +00:00
Chris Lattner b1a9492ed7 silence a bogus warning
llvm-svn: 32597
2006-12-15 07:36:19 +00:00
Evan Cheng 35fdd5ffe1 Expand FP compares to soft-fp call(s)
llvm-svn: 32590
2006-12-15 02:59:56 +00:00
Jim Laskey 70323a8146 1. Tidy up jump table info.
2. Allow the jit to handle PIC relocable jump tables.

llvm-svn: 32581
2006-12-14 19:17:33 +00:00
Evan Cheng 22cf89967b More soft-fp work.
llvm-svn: 32559
2006-12-13 20:57:08 +00:00
Evan Cheng e370e0eb09 Expand (f64 extload f32) to (f64 fp_ext (load f32)) if f64 type action is expand.
llvm-svn: 32527
2006-12-13 03:19:57 +00:00
Evan Cheng f3a80c6235 Expand fsqrt, fsin, and fcos to libcalls.
llvm-svn: 32526
2006-12-13 02:38:13 +00:00
Evan Cheng 0a5b805f6d Expand f32 / f64 to i32 / i64 conversion to soft-fp library calls.
llvm-svn: 32523
2006-12-13 01:57:55 +00:00
Evan Cheng 3766fc60da Expand FP constant to integers if FP types are not legal.
llvm-svn: 32497
2006-12-12 22:19:28 +00:00
Evan Cheng 97a750fc47 Soft fp FNEG, SINT_TO_FP, UINT_TO_FP libcall expansion.
llvm-svn: 32495
2006-12-12 21:51:17 +00:00
Evan Cheng 47833a1d28 Expand ConstantFP to load from CP if float types are being expanded.
llvm-svn: 32494
2006-12-12 21:32:44 +00:00
Evan Cheng 0076ca0da9 - When expanding a bit_convert whose src operand is also to be expanded and
its expansion result type is equal to the result type of the bit_convert,
e.g. (i64 bit_convert (f64 op)) if FP is not legal
returns the result of the expanded source operand.
- Store f32 / f64 may be expanded to a single store i32/i64.

llvm-svn: 32490
2006-12-12 19:53:13 +00:00
Chris Lattner 2f96e7d241 fit in 80 cols
llvm-svn: 32474
2006-12-12 05:22:21 +00:00
Chris Lattner 080881614d this can only be fptrunc.
llvm-svn: 32473
2006-12-12 05:21:51 +00:00
Chris Lattner 6ba11fbd75 Revert Nate's patch to fix X86/store-fp-constant.ll. With the dag combiner
and legalizer separated like they currently are, I don't see a way to handle
this xform.

llvm-svn: 32466
2006-12-12 04:18:56 +00:00
Reid Spencer 3c49edcaa1 Change inferred cast creation calls to more specific cast creations.
llvm-svn: 32460
2006-12-12 01:17:41 +00:00
Evan Cheng 3432ab97c1 Re-apply changes that were backed out and fix a naughty typo.
llvm-svn: 32442
2006-12-11 19:27:14 +00:00
Chris Lattner e9a203c4e5 Revert changes that broke oggenc on ppc
llvm-svn: 32440
2006-12-11 18:53:38 +00:00
Evan Cheng f4bec95b58 f32 / f64 node is expanded to one i32 / i64 node.
llvm-svn: 32433
2006-12-11 06:50:04 +00:00
Evan Cheng f6b01fdb48 Clean up some bad code.
llvm-svn: 32432
2006-12-11 06:25:26 +00:00
Nate Begeman 8e20c760fa Move something that should be in the dag combiner from the legalizer to the
dag combiner.

llvm-svn: 32431
2006-12-11 02:23:46 +00:00
Evan Cheng 4eee72471c Preliminary soft float support.
llvm-svn: 32394
2006-12-09 02:42:38 +00:00
Bill Wendling 22e978a736 Removing even more <iostream> includes.
llvm-svn: 32320
2006-12-07 20:04:42 +00:00
Evan Cheng a743fada65 Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.
llvm-svn: 32022
2006-11-29 19:13:47 +00:00
Evan Cheng 6973993e9c Allow target to custom lower READCYCLECOUNTER (when it doesn't have to be expanded).
llvm-svn: 32016
2006-11-29 08:26:18 +00:00
Chris Lattner 3abb63651b Fix PR1016
llvm-svn: 31950
2006-11-28 01:03:30 +00:00
Chris Lattner db18938355 If a brcond condition is promoted, make sure to zero extend it, even if not
expanded into BR_CC.

llvm-svn: 31932
2006-11-27 04:39:56 +00:00
Chris Lattner 94c231f453 Fix PR988 and CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll.
The low part goes in the first operand of expandop, not the second one.

llvm-svn: 31487
2006-11-07 04:11:44 +00:00
Reid Spencer de46e48420 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Evan Cheng e6d584765f Fix a typo which can break jumptables.
llvm-svn: 31305
2006-10-31 02:31:00 +00:00
Evan Cheng 84a28d4e76 Lower jumptable to BR_JT. The legalizer can lower it to a BRIND or let the target custom lower it.
llvm-svn: 31293
2006-10-30 08:00:44 +00:00
Reid Spencer e0fc4dfc22 For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.

llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Evan Cheng ab51cf2e78 Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
llvm-svn: 30945
2006-10-13 21:14:26 +00:00
Jim Laskey 6a4c6d3a7a Typo
llvm-svn: 30884
2006-10-11 17:52:19 +00:00
Evan Cheng d35734bd1f Naming consistency.
llvm-svn: 30878
2006-10-11 07:10:22 +00:00
Andrew Lenharth a6bbf33cbf Jimptables working again on alpha.
As a bonus, use the GOT node instead of the AlphaISD::GOT for internal stuff.

llvm-svn: 30873
2006-10-11 04:29:42 +00:00
Chris Lattner 8438429c96 Fix another bug in extload promotion.
llvm-svn: 30857
2006-10-10 18:54:19 +00:00
Evan Cheng dc6a3aab71 Fix a bug introduced by my LOAD/LOADX changes.
llvm-svn: 30853
2006-10-10 07:51:21 +00:00
Evan Cheng e71fe34d75 Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.
llvm-svn: 30844
2006-10-09 20:57:25 +00:00
Chris Lattner f9f90bc239 Fix a bug legalizing zero-extending i64 loads into 32-bit loads. The bottom
part was always forced to be sextload, even when we needed an zextload.

llvm-svn: 30782
2006-10-07 00:58:36 +00:00
Chris Lattner f5839a0816 Fix a miscompilation of:
long long foo(long long X) {
  return (long long)(signed char)(int)X;
}

Instead of:

_foo:
        extsb r2, r4
        srawi r3, r4, 31
        mr r4, r2
        blr

we now produce:

_foo:
        extsb r4, r4
        srawi r3, r4, 31
        blr

This fixes a miscompilation in ConstantFolding.cpp.

llvm-svn: 30768
2006-10-06 17:34:12 +00:00
Evan Cheng df9ac47e5e Make use of getStore().
llvm-svn: 30759
2006-10-05 23:01:46 +00:00
Evan Cheng 5d9fd977d3 Combine ISD::EXTLOAD, ISD::SEXTLOAD, ISD::ZEXTLOAD into ISD::LOADX. Add an
extra operand to LOADX to specify the exact value extension type.

llvm-svn: 30714
2006-10-04 00:56:09 +00:00
Evan Cheng 91d76cb27f Fix an obvious typo.
llvm-svn: 30711
2006-10-03 23:08:27 +00:00
Andrew Lenharth 783a4a9d86 Add support for other relocation bases to jump tables, as well as custom asm directives
llvm-svn: 30593
2006-09-24 19:45:58 +00:00