llvm-6502/lib
Andrew Trick c4c5a1d526 Allow MachineCSE to coalesce trivial subregister copies the same way that it coalesces normal copies.
Without this, MachineCSE is powerless to handle redundant operations with truncated source operands.

This required fixing the 2-addr pass to handle tied subregisters. It isn't clear what combinations of subregisters can legally be tied, but the simple case of truncated source operands is now safely handled:

     %vreg11<def> = COPY %vreg1:sub_32bit; GR32:%vreg11 GR64:%vreg1
     %vreg12<def> = COPY %vreg2:sub_32bit; GR32:%vreg12 GR64:%vreg2
     %vreg13<def,tied1> = ADD32rr %vreg11<tied0>, %vreg12<kill>, %EFLAGS<imp-def>

Test case: cse-add-with-overflow.ll.

This exposed an existing bug in
PPCInstrInfo::commuteInstruction. Thanks to Rafael for the test case:
PowerPC/crash.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197465 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 04:50:45 +00:00
..
Analysis [block-freq] Teach branch probability how to return the edge weight in between a BasicBlock and one of its successors. 2013-12-14 02:24:25 +00:00
AsmParser Debug Info: drop debug info via upgrading path if version number does not match. 2013-12-02 21:29:56 +00:00
Bitcode Remove unused value. 2013-12-07 02:27:52 +00:00
CodeGen Allow MachineCSE to coalesce trivial subregister copies the same way that it coalesces normal copies. 2013-12-17 04:50:45 +00:00
DebugInfo DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers 2013-12-13 21:33:40 +00:00
ExecutionEngine Prune redundant dependencies in LLVMBuild.txt. 2013-12-11 00:30:57 +00:00
IR Revert r197438 and r197447 until we figure out how to avoid circular dependency at link time 2013-12-17 01:19:59 +00:00
IRReader [llvm-c] Expose IRReader interface 2013-11-06 09:21:15 +00:00
Linker Revert "Move copying of global initializers below the cloning of functions." 2013-11-09 00:43:18 +00:00
LTO Add TargetLibraryInfo in LTO passes builder 2013-12-12 01:37:39 +00:00
MC DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers 2013-12-13 21:33:40 +00:00
Object Fix a pair of array index checks. 2013-12-06 02:33:38 +00:00
Option Avoid buffer copies when a Twine already is a StringRef. 2013-12-03 18:18:28 +00:00
Support Revert r197438 and r197447 until we figure out how to avoid circular dependency at link time 2013-12-17 01:19:59 +00:00
TableGen Fix most memory leaks in tablegen. 2013-10-31 04:07:41 +00:00
Target Allow MachineCSE to coalesce trivial subregister copies the same way that it coalesces normal copies. 2013-12-17 04:50:45 +00:00
Transforms LoopVectorizer: Don't if-convert constant expressions that can trap 2013-12-17 01:11:01 +00:00
CMakeLists.txt Move LTO support library to a component, allowing it to be tested 2013-09-24 23:52:22 +00:00
LLVMBuild.txt Move LTO support library to a component, allowing it to be tested 2013-09-24 23:52:22 +00:00
Makefile Reformat Makefile. No other changes. 2013-10-30 04:03:03 +00:00