Commit Graph

6706 Commits

Author SHA1 Message Date
Reid Spencer
0a783f783c For PR950:
Replace the REM instruction with UREM, SREM and FREM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 01:53:59 +00:00
Chris Lattner
331d1bc5df Implement the getRegForInlineAsmConstraint method for PPC. With recent
sdisel changes, this eliminates a ton of copies around common inline asms.
For example:

int test2(int Y, int X) {
  asm("foo %0, %1" : "=r"(X): "r"(X));
  return X;
}

now compiles to:

_test2:
        foo r3, r4
        blr

instead of:

_test2:
        mr r2, r4
        foo r2, r2
        mr r3, r2
        blr

GCC produces:

_test2:
        foo r4, r4
        mr r3,r4
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31367 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 01:44:04 +00:00
Evan Cheng
e6ae14e1f4 Rename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31364 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 23:18:32 +00:00
Evan Cheng
981b5bd708 Added getTiedToSrcOperand() to check for two-address'ness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31360 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 23:00:31 +00:00
Rafael Espindola
560a8d0512 print null values in bss
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31349 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 14:26:44 +00:00
Rafael Espindola
9dca7ad78f implement zextload bool and truncstore bool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31348 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 14:13:27 +00:00
Evan Cheng
acf7f2e3a9 Fix ldmxcsr JIT encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31343 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 06:53:52 +00:00
Evan Cheng
2f15c063ba Add constraints to Instruction class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31332 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 00:26:27 +00:00
Andrew Lenharth
6bbf6b0b65 more shotenning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31331 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 23:46:56 +00:00
Evan Cheng
63af319c4b Nuke dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31327 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 21:53:31 +00:00
Chris Lattner
22aaf1d61c allow the address of a global to be used with the "i" constraint when in
-static mode.  This implements PR882.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31326 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 20:13:11 +00:00
Chris Lattner
0d92499455 implement the 'c' inline asm modifier character
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31325 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 20:12:30 +00:00
Andrew Lenharth
956a431930 Let us play simplify the td file (and fix a few missed sub and mul patterns).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31322 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 19:52:12 +00:00
Chris Lattner
1a60aa7bc1 handle "st" as "st(0)"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31320 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 19:42:44 +00:00
Chris Lattner
dba1aeedd8 Change the prototype for TargetLowering::isOperandValidForConstraint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 19:40:43 +00:00
Andrew Lenharth
f81173f70e Add all that branch mangling niftiness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31313 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 16:49:55 +00:00
Rafael Espindola
b191e0ab51 add support for calling functions when the caller has variable sized objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 13:03:26 +00:00
Anton Korobeynikov
ab4022f196 1. Clean up code due to changes in SwitchTo*Section(2)
2. Added partial debug support for mingw\cygwin targets (the same as
   Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
   for storing debug info by default, thus many (runtime) libraries has
   this information included. These formats shouldn't be mixed in one binary
   ('stabs' & 'DWARF'), otherwise binutils tools will be confused.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31311 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 08:31:24 +00:00
Anton Korobeynikov
b52cf1f194 Unbreaking static ctors patch.
Defaulting second arguments of SwitchTo*Section, this should make things
somehow clearer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31306 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 06:11:06 +00:00
Reid Spencer
090ac3641d Make this compile again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31304 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 01:45:56 +00:00
Evan Cheng
2e323aa09d Apply Aton's LLVM patch for PR973: Linux ctors / dtors support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31303 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 01:26:55 +00:00
Chris Lattner
1d75400e2e fix miscompilation of llvm.isunordered, where we branched on the opposite
condition.  This fixes miscompilation of Olden/bh and many others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31301 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 23:02:25 +00:00
Reid Spencer
02b8511364 Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4
generated object modules to be debugged with gdb. Hopefully this helps
pre-release debugging.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31299 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 22:32:30 +00:00
Chris Lattner
6ce644392e fix wonky indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 22:27:23 +00:00
Evan Cheng
c35497fc2a All targets expand BR_JT for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31294 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 08:02:39 +00:00
Chris Lattner
ef13982aa7 implement the BlockHasNoFallThrough hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31264 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 17:35:02 +00:00
Chris Lattner
c24ff8ed12 add another target hook for branch folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31262 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 17:29:57 +00:00
Evan Cheng
31b6ddad31 Doh. Must check if GV is constant first before putting it in .cstring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31253 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 05:56:51 +00:00
Evan Cheng
71aae62445 Doh. Must check if GV is constant first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31252 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 05:56:06 +00:00
Chris Lattner
ae2650a9cf don't dist internal readme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31247 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 00:51:15 +00:00
Chris Lattner
985384c41d don't dist internal readme's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31246 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 00:49:54 +00:00
Chris Lattner
064fdccf98 don't distribute internal readme's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31245 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 00:48:27 +00:00
Reid Spencer
b9112019de Make sure all the readme files get distributed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31244 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 00:11:39 +00:00
Chris Lattner
7a498cbc60 this doesn't occur any more in mason
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31236 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 22:02:19 +00:00
Chris Lattner
4ccf63d8cf the code in question is now:
cmpw cr0, r7, r3
        ble cr0, LBB1_5 ;bb25
LBB1_8: ;bb17
        cmpw cr0, r8, r5
        bgt cr0, LBB1_2 ;bb

which is just as good as crnand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31235 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 22:00:55 +00:00
Evan Cheng
f686d9b71f Fixed a significant bug where unpcklpd is incorrectly used to extract element 1 from a v2f64 value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31228 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 21:08:32 +00:00
Evan Cheng
6bdb3f6c8f Fix for PR968: expand vector sdiv, udiv, srem, urem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31220 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 18:49:08 +00:00
Reid Spencer
c50209bf68 Initialize CStringSection member var.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31214 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 16:14:06 +00:00
Evan Cheng
87e0813f03 Change load PatFrag to ignore indexed load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31210 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 21:55:50 +00:00
Evan Cheng
80aa9a122f Place cstrings in .cstring section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31207 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 21:48:57 +00:00
Evan Cheng
8910c1cacb Put cstrings in .cstring section when compiling for Mac OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31203 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 19:18:18 +00:00
Rafael Espindola
7ae68ab3bc initial support for frame pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31197 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 13:31:26 +00:00
Reid Spencer
72ddc211e9 Enclose a case in { and } so that the pickier compilers don't complain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31196 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 06:17:40 +00:00
Reid Spencer
1628cec4d7 For PR950:
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 06:15:43 +00:00
Evan Cheng
9eca5e814d During vector shuffle lowering, we sometimes commute a vector shuffle to try
to match MOVL (movss, movsd, etc.). Don't forget to commute it back and try
unpck* and shufp* if that doesn't pan out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31186 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-25 21:49:50 +00:00
Evan Cheng
009073d839 X86ISD::PEXTRW 3rd operand type is always target pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31185 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-25 21:35:05 +00:00
Evan Cheng
9bbbb98a60 Remove -disable-x86-shuffle-opti
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31183 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-25 20:48:19 +00:00
Devang Patel
f9c197e022 Move getPreferredAlignmentLog from AsmPrinter to TargetData
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31171 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 20:32:14 +00:00
Rafael Espindola
0e5e3aacbe expand ISD::VACOPY
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31170 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 20:15:21 +00:00
Chris Lattner
bacf9f4888 Fix CodeGen/IA64/ret-0.ll, which has apparently been broken since some of the
isel changes happened months ago.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31164 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 17:09:43 +00:00