llvm-6502/lib
Andrea Di Biagio 3b15669938 Fix for PR23103. Correctly propagate the 'IsUndef' flag to the register operands of a commuted instruction.
Revision 220239 exposed a latent bug in method
'TargetInstrInfo::commuteInstruction'. When commuting the operands of a machine
instruction, method 'commuteInstruction' didn't correctly propagate the
'IsUndef' flag to the register operands of the new (commuted) instruction.

Before this patch, the following instruction:
  %vreg4<def> = VADDSDrr  %vreg14, %vreg5<undef>; FR64:%vreg4,%vreg14,%vreg5

was wrongly converted by method 'commuteInstruction' into:
  %vreg4<def> = VADDSDrr  %vreg5, %vreg14<undef>; FR64:%vreg4,%vreg5,%vreg14

The correct instruction should have been:
  %vreg4<def> = VADDSDrr  %vreg5<undef>, %vreg14; FR64:%vreg4,%vreg5,%vreg14

This patch fixes the problem in method 'TargetInstrInfo::commuteInstruction'.
When swapping the operands of a machine instruction, we now make sure that
'IsUndef' flags are correctly set.
Added test case 'pr23103.ll'.

Differential Revision: http://reviews.llvm.org/D9406


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236258 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-30 21:03:29 +00:00
..
Analysis
AsmParser [opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space 2015-04-29 21:22:39 +00:00
Bitcode
CodeGen Fix for PR23103. Correctly propagate the 'IsUndef' flag to the register operands of a commuted instruction. 2015-04-30 21:03:29 +00:00
DebugInfo
ExecutionEngine
Fuzzer
IR [opaque pointer type] Store the value type of an alloca 2015-04-29 23:00:35 +00:00
IRReader
LineEditor
Linker [opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space 2015-04-29 21:22:39 +00:00
LTO
MC Avoid an extra loop over the sections. 2015-04-30 20:57:14 +00:00
Object
Option
Passes
ProfileData
Support
TableGen [TableGen] Cleanup formatting by moving operators from beginning of line to end of previous line. NFC 2015-04-30 05:54:22 +00:00
Target Mips: Remove dead declaration 2015-04-30 19:35:43 +00:00
Transforms [InstCombine] Add new rule for MIN(MAX(~A, ~B), ~C) et. al. 2015-04-30 04:56:04 +00:00
CMakeLists.txt
LLVMBuild.txt [PM] Create a separate library for high-level pass management code. 2015-03-07 09:02:36 +00:00
Makefile