diff options
author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2015-04-30 21:03:29 +0000 |
---|---|---|
committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2015-04-30 21:03:29 +0000 |
commit | c84b5bdd695f9c0fa704998528a70fdd9c97bb77 (patch) | |
tree | af4bcafac164f6faccfdcbac5fb04841625bb177 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | a001a32c318d6e48cc16e5f64809ef6d73ad0ae8 (diff) | |
download | llvm-c84b5bdd695f9c0fa704998528a70fdd9c97bb77.zip llvm-c84b5bdd695f9c0fa704998528a70fdd9c97bb77.tar.gz llvm-c84b5bdd695f9c0fa704998528a70fdd9c97bb77.tar.bz2 |
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
llvm-svn: 236258
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions