Commit Graph

6437 Commits

Author SHA1 Message Date
Daniel Dunbar
dce5e74162 Update to match space changes in .ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64322 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 20:48:21 +00:00
Dale Johannesen
85b0edec46 Make a transformation added in 63266 a bit less aggressive.
It was transforming (x&y)==y to (x&y)!=0 in the case where
y is variable and known to have at most one bit set (e.g. z&1).
This is not correct; the expressions are not equivalent when y==0.
I believe this patch salvages what can be salvaged, including
all the cases in bt.ll.  Dan, please review.
Fixes gcc.c-torture/execute/20040709-[12].c



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64314 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 19:19:41 +00:00
Bill Wendling
905c7e9a04 Revert r64300 and r64301. These were causing the following errors respectively:
During llvm-gcc bootstrap:

Undefined symbols:
  "llvm::FPPassManager::doFinalization(llvm::Module&)", referenced from:
      (anonymous namespace)::CGPassManager::doFinalization(llvm::CallGraph&, llvm::Module&)
        in libLLVMipa.a(CallGraphSCCPass.o)
  "llvm::FPPassManager::doInitialization(llvm::Module&)", referenced from:
      (anonymous namespace)::CGPassManager::doInitialization(llvm::CallGraph&, llvm::Module&)
        in libLLVMipa.a(CallGraphSCCPass.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/obj-llvm/Release/bin/opt] Error 1

During an LLVM release build:

/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-register-desc -o  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenRegisterInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction names with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-enums -o  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrNames.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction information with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-desc -o  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td assembly writer with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-asm-writer -o  /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenAsmWriter.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Compiling InstructionCombining.cpp for Release build 
if /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~dst/Developer/usr/bin/llvm-g++-4.2 -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3  -fno-exceptions  -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter  -fstrict-aliasing -Wstrict-aliasing -c -MMD -MP -MF "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.lo" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d" /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar/InstructionCombining.cpp -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o ; \
           then /bin/mv -f "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Trans



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 18:19:24 +00:00
Duncan Sands
af068750a7 Make sure the SCC pass manager initializes any contained
function pass managers.  Without this, simplify-libcalls
would add nocapture attributes when run on its own, but
not when run as part of -std-compile-opts or similar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64300 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 09:58:43 +00:00
Evan Cheng
752272a5e5 Implement PR3495: local spiller optimization. The local spiller can now keep availability information over BB boundaries. It visits BB's in depth first order. After visiting a BB if it find a successor which has a single predecessor it visits the successor next without clearing the availability information. This allows the successor to omit reloads or change them into copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64298 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 08:24:21 +00:00
Devang Patel
bd75b8345f If llvm.dbg.region.end is disappearing then remove corresponding llvm.dbg.func.start also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64278 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-11 01:29:06 +00:00
Devang Patel
0464a1431b Ignore dbg intrinsic while folding unconditional branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64242 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 22:14:17 +00:00
Evan Cheng
1d76864df3 Handle llvm.x86.sse2.maskmov.dqu in 64-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 22:06:28 +00:00
Duncan Sands
f5f0a1fe0d This is now done using a real i33, rather than
an emulated one.  Adjust the check.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64236 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 20:44:15 +00:00
Evan Cheng
f0e366a929 Fix PR3457: Ignore control successors when looking for closest scheduled successor. A control successor doesn't read result(s) produced by the scheduling unit being evaluated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64210 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 08:30:11 +00:00
Devang Patel
f66d7b5a51 Do not clone llvm.dbg.func.start and corresponding llvm.dbg.region.end during inlining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64209 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 07:48:18 +00:00
Devang Patel
4afc90dacf Enable scalar replacement of AllocaInst whose one of the user is dbg info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64207 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-10 07:00:59 +00:00
Evan Cheng
a0eedac226 Implement FpSET_ST1_*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64186 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 23:32:07 +00:00
Dale Johannesen
1de17d574c Fix PR 3471, and some cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 22:14:15 +00:00
Evan Cheng
b1032a8a2f Make sure constant subscript is truncated to ptr size if it may not fit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 20:54:38 +00:00
Duncan Sands
f60df7f486 Testcase for PR2437.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 09:41:49 +00:00
Evan Cheng
8f0d99e463 Re-enable machine sinking pass now that the coalescer bugs and the AnalyzeBrnach bug are fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64126 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-09 08:45:39 +00:00
Bill Wendling
171de4fa94 Rename dg.exp to llvmc.exp. This is so I can ignore it during a make check if I want to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64103 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 22:52:50 +00:00
Mikhail Glushenkov
6dff394afd The 'false.c' test must depend on llvm-g++.
Also, turn on Objective-C/C++ tests.
This should fix http://llvm.org/bugs/show_bug.cgi?id=3499.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 11:44:37 +00:00
Evan Cheng
0a1fcce092 Fix PR3486. Fix a bug in code that manually patch physical register live interval after its sub-register is coalesced with a virtual register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 11:04:35 +00:00
Evan Cheng
77fde2cbb1 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64073 91177308-0d34-0410-b5e6-96231b3b80d8 2009-02-08 07:48:37 +00:00
Bill Wendling
7f51fd3ea9 Revert r63999. It was breaking self-hosting builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64062 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 00:58:05 +00:00
Chris Lattner
ed54534a82 testcase for r64049 of llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64050 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 23:37:03 +00:00
Mon P Wang
6753f959d2 Instrcombine should not change load(cast p) to cast(load p) if the cast
changes the address space of the pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64035 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 22:19:29 +00:00
Evan Cheng
c963b638c7 Enable machine sinking pass in non-fast mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63999 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 01:57:46 +00:00
Devang Patel
d96c60df3f Ignore DbgInfoIntrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 06:19:06 +00:00
Chris Lattner
e991ced7cb fix PR3489, use bits instead of bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 04:34:07 +00:00
Evan Cheng
77402d1dbf Fix test. It produces unexpected code if sse4.1 is on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63906 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06 01:49:19 +00:00
Devang Patel
32d9701d68 Ignore dbg intrinsics while propagating conditional expression info. Take 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 23:32:52 +00:00
Evan Cheng
54801f78b1 isAsCheapAsMove instructions can have register src operands. Check if they are really re-materializable.
This fixes sse.expandfft and sse.stepfft.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63890 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 22:24:17 +00:00
Devang Patel
998cbb0444 Revert rev. 63876. It is causing llvm-gcc bootstrap failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 21:46:41 +00:00
Devang Patel
39c873e38f Remove dead blocks in the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63880 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 19:59:42 +00:00
Devang Patel
1851db6b0f Ignore dbg intrinsics while propagating conditional expression info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63876 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 19:15:39 +00:00
Chris Lattner
ca940bb630 testcase for rdar://6551276 and llvm-gcc r63873
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63874 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 18:15:17 +00:00
Evan Cheng
c5d1a4ffd9 Turn on machine LICM in non-fast mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63855 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 08:46:33 +00:00
Chris Lattner
4798bbeaf5 if we have a large GEP offset on a 32-bit or other target, make
sure to print the value properly sext'd to the right pointer size.
This fixes PR3481.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63843 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 06:55:21 +00:00
Devang Patel
2cc86a1de1 Ignore dbg intrinsics while folding switch instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63802 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-05 00:30:42 +00:00
Devang Patel
d0a203d76f Ignore dbg intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63781 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 21:39:48 +00:00
Mon P Wang
4781ad62d1 Add test case for r63760.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 21:10:56 +00:00
Nate Begeman
0091cf92c6 Remove now-incorrect test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63772 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 21:07:37 +00:00
Duncan Sands
09750273a4 Allow the inverse transform x86_fp80 -> i80 (also
fires during the Ada build).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63731 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 11:17:06 +00:00
Duncan Sands
a06aef6ec5 Fix PR3468: a crash when constant folding a bitcast of
i80 to x86 long double (this was presumably generated
by sroa).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63730 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 10:17:14 +00:00
Owen Anderson
fe9388ccb4 Finish making AliasAnalysis aware of the fact that most atomic intrinsics only dereference their arguments, and enhance
BasicAA to make use of this fact when computing ModRef info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63718 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 05:16:46 +00:00
Mon P Wang
7bcaefaf59 Fixes a case where we generate an incorrect mask for pshfhw in the presence
of undefs and incorrectly determining if we have punpckldq.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 01:16:59 +00:00
Devang Patel
556b20ab46 While folding vallue comparison terminators ignore dbg intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 01:06:11 +00:00
Devang Patel
65085cf7b3 Ignore dbg intrinsics while hoisting common code in the two blocks up into the branch block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 00:03:08 +00:00
Devang Patel
383d7ed915 Do not let dbg intrinsic block folding of two entry phi node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63671 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 22:12:02 +00:00
Chris Lattner
1aa7056b13 teach "convert from scalar" to handle loads of fca's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63659 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 21:08:45 +00:00
Chris Lattner
9b872db775 make scalar conversion handle stores of first class
aggregate values.  loads are not yet handled (coming
soon to an sroa near you).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63649 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 19:30:11 +00:00
Chris Lattner
1a3257bbf5 Make SROA produce a vector only when the alloca is actually
accessed at least once as a vector.  This prevents it from
compiling the example in not-a-vector into:

define double @test(double %A, double %B) {
	%tmp4 = insertelement <7 x double> undef, double %A, i32 0
	%tmp = insertelement <7 x double> %tmp4, double %B, i32 4
	%tmp2 = extractelement <7 x double> %tmp, i32 4
	ret double %tmp2
}

instead, producing the integer code.  Producing vectors when they
aren't otherwise in the program is dangerous because a lot of other
code treats them carefully and doesn't want to break them down.
OTOH, many things want to break down tasty i448's.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 18:15:05 +00:00