diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-06-25 03:27:12 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-06-25 03:27:12 +0000 |
commit | 6b556f824d77db596e2d8a1fa058764f9a722e0d (patch) | |
tree | a155b4ab338965fd692e4322cf3ee06f0a78a465 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 87d8fb91e9a993214524d2f3257746687e69ec44 (diff) | |
download | llvm-6b556f824d77db596e2d8a1fa058764f9a722e0d.zip llvm-6b556f824d77db596e2d8a1fa058764f9a722e0d.tar.gz llvm-6b556f824d77db596e2d8a1fa058764f9a722e0d.tar.bz2 |
Handle <undef> operands in TwoAddressInstructionPass.
When the source register to a 2-addr instruction is undefined, there is
no need to attempt any transformations - simply replace the source
register with the destination register.
This also comes up when lowering IMPLICIT_DEF instructions - make sure
the <undef> flag is moved to the new partial register def operand:
%vreg8<def> = INSERT_SUBREG %vreg9<undef>, %vreg0<kill>, sub_16bit
rewrite undef:
%vreg8<def> = INSERT_SUBREG %vreg8<undef>, %vreg0<kill>, sub_16bit
convert to:
%vreg8:sub_16bit<def,read-undef> = COPY %vreg0<kill>
llvm-svn: 159120
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions