llvm/test
Duncan Sands 3eba667081 Revert commits 96556 and 96640, because commit 96556 breaks the
dragonegg self-host build.  I reverted 96640 in order to revert
96556 (96640 goes on top of 96556), but it also looks like with
both of them applied the breakage happens even earlier.  The
symptom of the 96556 miscompile is the following crash:

  llvm[3]: Compiling AlphaISelLowering.cpp for Release build
  cc1plus: /home/duncan/tmp/tmp/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4982: void llvm::SelectionDAG::ReplaceAllUsesWith(llvm::SDNode*, llvm::SDNode*, llvm::SelectionDAG::DAGUpdateListener*): Assertion `(!From->hasAnyUseOfValue(i) || From->getValueType(i) == To->getValueType(i)) && "Cannot use this version of ReplaceAllUsesWith!"' failed.
  Stack dump:
  0.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@_ZN4llvm19AlphaTargetLowering14LowerOperationENS_7SDValueERNS_12SelectionDAGE'
  g++: Internal error: Aborted (program cc1plus)

This occurs when building LLVM using LLVM built by LLVM (via
dragonegg).  Probably LLVM has miscompiled itself, though it
may have miscompiled GCC and/or dragonegg itself: at this point
of the self-host build, all of GCC, LLVM and dragonegg were built
using LLVM.  Unfortunately this kind of thing is extremely hard
to debug, and while I did rummage around a bit I didn't find any
smoking guns, aka obviously miscompiled code.

Found by bisection.

r96556 | evancheng | 2010-02-18 03:13:50 +0100 (Thu, 18 Feb 2010) | 5 lines

Some dag combiner goodness:
Transform br (xor (x, y)) -> br (x != y)
Transform br (xor (xor (x,y), 1)) -> br (x == y)
Also normalize (and (X, 1) == / != 1 -> (and (X, 1)) != / == 0 to match to "test on x86" and "tst on arm"

r96640 | evancheng | 2010-02-19 01:34:39 +0100 (Fri, 19 Feb 2010) | 16 lines

Transform (xor (setcc), (setcc)) == / != 1 to
(xor (setcc), (setcc)) != / == 1.

e.g. On x86_64
  %0 = icmp eq i32 %x, 0
  %1 = icmp eq i32 %y, 0
  %2 = xor i1 %1, %0
  br i1 %2, label %bb, label %return
=>
	testl   %edi, %edi
	sete    %al
	testl   %esi, %esi
	sete    %cl
	cmpb    %al, %cl
	je      LBB1_2



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96672 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-19 11:30:41 +00:00
..
Analysis -disable-output is no longer needed with -analyze. 2010-01-26 19:25:59 +00:00
Archive fix a broken archive that was breaking dejagnu only (not lit) 2010-02-04 07:11:08 +00:00
Assembler Add support for a union type in LLVM IR. Patch by Talin! 2010-02-12 20:49:41 +00:00
Bindings/Ocaml Fix test/Bindings/Ocaml/vmcore.ml. When IRBuilder::CreateMalloc was removed, 2009-10-17 23:52:26 +00:00
Bitcode Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the case 2010-01-25 21:55:39 +00:00
BugPoint Use -output-prefix in bugpoint tests so that outputs go in temp directory (and 2009-09-07 19:26:18 +00:00
CodeGen Revert commits 96556 and 96640, because commit 96556 breaks the 2010-02-19 11:30:41 +00:00
DebugInfo Testcase for 94996 (PR 6157) 2010-02-01 22:46:05 +00:00
ExecutionEngine Test case for http://llvm.org/PR6028. 2010-01-15 11:29:26 +00:00
Feature Add support for a union type in LLVM IR. Patch by Talin! 2010-02-12 20:49:41 +00:00
FrontendAda Check that accessing a struct field that occurs before the start 2009-10-22 12:53:25 +00:00
FrontendC Test case for r96656. 2010-02-19 02:58:33 +00:00
FrontendC++ Ignore target dependent value in grep search. 2010-02-18 19:52:12 +00:00
FrontendFortran These tests are x86 specific. 2009-04-22 10:39:51 +00:00
FrontendObjC Test for 95961. 2010-02-12 02:35:03 +00:00
FrontendObjC++ This is an objective-c test, not an objective-c++ one. 2008-10-06 18:42:48 +00:00
Integer Delete useless trailing semicolons. 2010-01-05 17:55:26 +00:00
lib Add llvm_supports_darwin_and_target to DejaGNU as well, I'd almost forgotten it 2010-02-03 18:43:46 +00:00
Linker When a constant's type is refined, update the constant in place 2009-09-15 15:58:07 +00:00
LLVMC Revert r96130 ("Forward parameter options as '-option=param'"). 2010-02-15 03:17:06 +00:00
MC make pcrel immediate values relative to the start of the field, 2010-02-16 05:03:17 +00:00
Other Canonicalize sizeof and alignof on pointer types to a canonical 2010-02-10 06:13:07 +00:00
Scripts Teach macho-dump to dump UUIDs. 2009-10-24 20:32:36 +00:00
TableGen Add an !eq() operator to TableGen. It operates on strings only. 2010-01-05 19:11:42 +00:00
Transforms Fold bswap(undef) to undef. 2010-02-17 00:54:58 +00:00
Unit Roll back the shared library, r96559. It broke two darwins and arm, mysteriously. 2010-02-18 04:43:02 +00:00
Verifier Delete useless trailing semicolons. 2010-01-05 17:55:26 +00:00
CMakeLists.txt CMake/lit: Add llvm_{unit_,}site_config parameters, and always pass them when running tests from the project files. 2009-12-08 19:47:36 +00:00
lit.cfg Get the LLVMC tests working with clang++ by removing the problematic CXXFLAG in lit. 2010-02-04 18:40:11 +00:00
lit.site.cfg.in Generate lit.site.cfg from a .in file, as clang does. 2009-09-22 07:38:33 +00:00
Makefile Roll back the shared library, r96559. It broke two darwins and arm, mysteriously. 2010-02-18 04:43:02 +00:00
Makefile.tests Remove obsolete -f flags. 2009-08-25 15:38:29 +00:00
site.exp.in Two small fixes for site.exp for cmake. 2009-11-08 09:29:52 +00:00
TestRunner.sh Fix a bashism in TestRunner.sh. 2008-07-28 18:41:03 +00:00