[llvm-commits] [llvm] r82503 - /llvm/trunk/lib/CodeGen/LowerSubregs.cpp
Evan Cheng
evan.cheng at apple.com
Mon Sep 21 17:29:41 PDT 2009
Author: evancheng
Date: Mon Sep 21 19:29:40 2009
New Revision: 82503
URL: http://llvm.org/viewvc/llvm-project?rev=82503&view=rev
Log:
Minor bug fix. LowerSubregs should translate
%S0<def> = EXTRACT_SUBREG %Q0<kill>, 1
to
%S0<def> = IMPLICIT_DEF %Q0<imp-use,kill>
Implicit_def does not *read* any register so the operand should be marked "implicit". The missing "implicit" marker on the operand is wrong, but it doesn't actually break anything.
Modified:
llvm/trunk/lib/CodeGen/LowerSubregs.cpp
Modified: llvm/trunk/lib/CodeGen/LowerSubregs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LowerSubregs.cpp?rev=82503&r1=82502&r2=82503&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LowerSubregs.cpp (original)
+++ llvm/trunk/lib/CodeGen/LowerSubregs.cpp Mon Sep 21 19:29:40 2009
@@ -130,6 +130,7 @@
// instruction with IMPLICIT_DEF.
MI->setDesc(TII.get(TargetInstrInfo::IMPLICIT_DEF));
MI->RemoveOperand(2); // SubIdx
+ MI->getOperand(1).setImplicit(true);
DEBUG(errs() << "subreg: replace by: " << *MI);
return true;
}
More information about the llvm-commits
mailing list