Benjamin Kramer
52ffb6ea96
BuildUDIV: If the divisor is even we can simplify the fixup of the multiplied value by introducing an early shift.
...
This allows us to compile "unsigned foo(unsigned x) { return x/28; }" into
shrl $2, %edi
imulq $613566757, %rdi, %rax
shrq $32, %rax
ret
instead of
movl %edi, %eax
imulq $613566757, %rax, %rcx
shrq $32, %rcx
subl %ecx, %eax
shrl %eax
addl %ecx, %eax
shrl $4, %eax
on x86_64
llvm-svn: 127829
2011-03-17 20:39:14 +00:00
Benjamin Kramer
a85996c235
Add an argument to APInt's magic udiv calculation to specify the number of bits that are known zero in the divided number.
...
This will come in handy soon.
llvm-svn: 127828
2011-03-17 20:39:06 +00:00
Jakob Stoklund Olesen
047a25b0b0
Dead code elimination may separate the live interval into multiple connected components.
...
I have convinced myself that it can only happen when a phi value dies. When it
happens, allocate new virtual registers for the components.
llvm-svn: 127827
2011-03-17 20:37:07 +00:00
Stuart Hastings
ab87d41b43
Reapply: Add type output to llvm-dis annotations. Patch by Yuri!
...
llvm-svn: 127824
2011-03-17 19:50:04 +00:00
Richard Osborne
6bad79b514
Add XCore intrinsic for setpsc.
...
llvm-svn: 127821
2011-03-17 18:42:05 +00:00
Stuart Hastings
da553eb3ef
Revert 127813 while fixing broken test.
...
llvm-svn: 127814
2011-03-17 16:54:27 +00:00
Stuart Hastings
b1ced0cb9e
Add type output to llvm-dis. Patch by Yuri!
...
llvm-svn: 127813
2011-03-17 16:30:14 +00:00
Daniel Dunbar
0e9d7aeb1f
MC/Mach-O: Fix regression introduced in r126127, this assignment shouldn't have
...
been removed.
llvm-svn: 127812
2011-03-17 16:25:24 +00:00
Cameron Zwarich
cea63dc052
Move more logic into getTypeForExtArgOrReturn.
...
llvm-svn: 127809
2011-03-17 14:53:37 +00:00
Cameron Zwarich
0f031dccab
Change the signext language in LangRef to closer match zeroext.
...
llvm-svn: 127808
2011-03-17 14:21:58 +00:00
Cameron Zwarich
a5746339cc
Rename getTypeForExtendedInteger() to getTypeForExtArgOrReturn().
...
llvm-svn: 127807
2011-03-17 14:21:56 +00:00
Nick Lewycky
50afb5a262
Add comments for the demanglings. Correct mangled form of operator delete!
...
llvm-svn: 127801
2011-03-17 05:20:12 +00:00
NAKAMURA Takumi
0639b29656
test/CodeGen/X86/h-registers-1.ll: Add explicit -mtriple=x86_64-linux. It does not need to be checked on x86_64-win32 (aka Win64).
...
llvm-svn: 127800
2011-03-17 04:24:40 +00:00
Nick Lewycky
9dac4ea71f
Add "swi" which is an obsolete mnemonic for "svc".
...
llvm-svn: 127788
2011-03-17 01:46:14 +00:00
Eli Friedman
dcc256df41
A couple new README entries.
...
llvm-svn: 127786
2011-03-17 01:22:09 +00:00
Rafael Espindola
8dab9a762b
Add support in the LTO library for loading an object from the middle
...
of an file.
llvm-svn: 127781
2011-03-17 00:36:11 +00:00
Joerg Sonnenberger
e37bdf4386
Fix handling of @IDNTPOFF relocations, they need to get STT_TLS.
...
While here, add VK_ARM_TPOFF and VK_ARM_GOTTPOFF, too.
llvm-svn: 127780
2011-03-17 00:35:10 +00:00
Jakob Stoklund Olesen
2786187b43
Rewrite instructions as part of ConnectedVNInfoEqClasses::Distribute.
...
llvm-svn: 127779
2011-03-17 00:23:45 +00:00
NAKAMURA Takumi
8d08700d77
test/CodeGen/X86/constant-pool-remat-0.ll: FileCheck-ize and add explicit -mtriple=x86_64-linux.
...
llvm-svn: 127775
2011-03-16 23:01:31 +00:00
Jakob Stoklund Olesen
5c0d2aecc5
Add a LiveRangeEdit delegate callback before shrinking a live range.
...
The register allocator needs to adjust its live interval unions when that happens.
llvm-svn: 127774
2011-03-16 22:56:16 +00:00
Jakob Stoklund Olesen
8751b4e276
Erase virtual registers that are unused after DCE.
...
llvm-svn: 127773
2011-03-16 22:56:13 +00:00
Jakob Stoklund Olesen
940b7d46d3
Tag cached interference with a user-provided tag instead of the virtual register number.
...
The live range of a virtual register may change which invalidates the cached
interference information.
llvm-svn: 127772
2011-03-16 22:56:11 +00:00
Jakob Stoklund Olesen
7b60f4161a
Clarify debugging output.
...
llvm-svn: 127771
2011-03-16 22:56:08 +00:00
Cameron Zwarich
2bb1e45ea3
The x86-64 ABI says that a bool is only guaranteed to be sign-extended to a byte
...
rather than an int. Thankfully, this only causes LLVM to miss optimizations, not
generate incorrect code.
This just fixes the zext at the return. We still insert an i32 ZextAssert when
reading a function's arguments, but it is followed by a truncate and another i8
ZextAssert so it is not optimized.
llvm-svn: 127766
2011-03-16 22:20:18 +00:00
Cameron Zwarich
005920cae9
Rename a test to be more inclusive.
...
llvm-svn: 127765
2011-03-16 22:20:12 +00:00
Cameron Zwarich
860d06739b
Don't recompute something that we already have in a local variable.
...
llvm-svn: 127764
2011-03-16 22:20:07 +00:00
Daniel Dunbar
8757b8c000
Revert r127757, "Patch to a fix dwarf relocation problem on ARM. One-line fix
...
plus the test where it used to break.", which broke Clang self-host of a
Debug+Asserts compiler, on OS X.
llvm-svn: 127763
2011-03-16 22:16:39 +00:00
Richard Osborne
8b90369d96
Add XCore intrinsics for setclk, setrdy.
...
llvm-svn: 127761
2011-03-16 21:56:00 +00:00
Renato Golin
bf788a5626
Patch to a fix dwarf relocation problem on ARM. One-line fix plus the test where it used to break.
...
llvm-svn: 127757
2011-03-16 21:05:52 +00:00
Cameron Zwarich
05eb0080d6
Add a test for i1 zeroext arguments on x86-64. We currently generate code that
...
conforms to the ABI, but DAGCombine could in theory recognize the sequence of
zext asserts and truncates and generate incorrect code.
llvm-svn: 127754
2011-03-16 20:15:44 +00:00
Richard Osborne
318e25c620
Add checkevent intrinsic to check if any resources owned by the current thread
...
can event.
llvm-svn: 127741
2011-03-16 18:34:00 +00:00
NAKAMURA Takumi
7fd500c31d
test/CodeGen/X86: FileCheck-ize and add actions for x86_64-linux and x86_64-win32.
...
llvm-svn: 127734
2011-03-16 13:53:07 +00:00
NAKAMURA Takumi
aa13f3550e
test/CodeGen/X86: Add a pattern for Win64.
...
llvm-svn: 127733
2011-03-16 13:52:51 +00:00
NAKAMURA Takumi
e776f16e9d
test/CodeGen/X86: FileCheck-ize and add explicit -mtriple=x86_64-linux. They are useless to Win64 target.
...
llvm-svn: 127732
2011-03-16 13:52:38 +00:00
NAKAMURA Takumi
bfbbe15937
test/CodeGen/X86/byval*.ll: Win64 has not supported byval yet.
...
llvm-svn: 127731
2011-03-16 13:52:20 +00:00
NAKAMURA Takumi
73a9789e43
test/CodeGen/X86/dyn-stackalloc.ll: FileCheck-ize.
...
llvm-svn: 127730
2011-03-16 13:52:08 +00:00
Cameron Zwarich
c60b47a7e2
Fix a comment.
...
llvm-svn: 127728
2011-03-16 08:13:42 +00:00
NAKAMURA Takumi
341bf54557
lib/Support/raw_ostream.cpp: On mingw, report_fatal_error() should not be called at dtor context.
...
report_fatal_error() invokes exit(). We know report_fatal_error() might not write messages to stderr when any errors were detected on FD == 2.
llvm-svn: 127726
2011-03-16 02:53:39 +00:00
NAKAMURA Takumi
bcbcf099b4
Windows/PathV2.inc: [PR8520] Recognize "NUL" as special (character) file.
...
FIXME: It is a temporal hack. We should detect as many "special file name" as possible.
llvm-svn: 127724
2011-03-16 02:53:32 +00:00
NAKAMURA Takumi
042801b7d2
Windows/Path.inc: [PR6270] PathV1::makeUnique(): Give arbitrary initial seed for workaround.
...
FIXME: We should use sys::fs::unique_file() in future.
llvm-svn: 127723
2011-03-16 02:53:24 +00:00
Jim Grosbach
c68c99f640
Tidy up. Whitespace and 80 column.
...
llvm-svn: 127721
2011-03-16 01:21:55 +00:00
Devang Patel
f0148aca2e
Do not accidently initialize NumDbgValueLost and NumDbgLineLost counts.
...
llvm-svn: 127720
2011-03-16 00:27:57 +00:00
Cameron Zwarich
7fd94ea393
Only convert allocas to scalars if it is profitable. The profitability metric I
...
chose is having a non-memcpy/memset use and being larger than any native integer
type. Originally I chose having an access of a size smaller than the total size
of the alloca, but this caused some minor issues on the spirit benchmark where
SRoA runs again after some inlining.
This fixes <rdar://problem/8613163>.
llvm-svn: 127718
2011-03-16 00:13:44 +00:00
Cameron Zwarich
68f72463eb
Add native integer type TargetData to some existing tests.
...
llvm-svn: 127717
2011-03-16 00:13:40 +00:00
Cameron Zwarich
88790f3d4d
Better use initializer lists.
...
llvm-svn: 127716
2011-03-16 00:13:37 +00:00
Cameron Zwarich
f09bb5f2f5
Add a clarifying comment.
...
llvm-svn: 127715
2011-03-16 00:13:35 +00:00
Cameron Zwarich
96e380e650
Add TargetData::fitsInLegalInteger().
...
llvm-svn: 127714
2011-03-16 00:13:28 +00:00
Johnny Chen
e88573849d
There were two issues fixed:
...
1. The ARM Darwin *r9 call instructions were pseudo-ized recently.
Modify the ARMDisassemblerCore.cpp file to accomodate the change.
2. The disassembler was unnecessarily adding 8 to the sign-extended imm24:
imm32 = SignExtend(imm24:'00', 32); // A8.6.23 BL, BLX (immediate)
// Encoding A1
It has no business doing such. Removed the offending logic.
Add test cases to arm-tests.txt.
llvm-svn: 127707
2011-03-15 22:27:33 +00:00
John Thompson
da294e31da
Add scei vendor
...
llvm-svn: 127705
2011-03-15 21:51:56 +00:00
Bill Wendling
c12aadb9b6
The VTBL (and VTBX) instructions are rather permissive concerning the masks they
...
accept. If a value in the mask is out of range, it uses the value 0, for VTBL,
or leaves the value unchanged, for VTBX.
llvm-svn: 127700
2011-03-15 21:15:20 +00:00