summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/IfConversion.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2012-05-30 00:42:02 +0000
committerEvan Cheng <evan.cheng@apple.com>2012-05-30 00:42:02 +0000
commit50954fb3e164cc59387ef0887c703dcc70f331db (patch)
treecc68661f2d588532a27c77ae912199877775bfc1 /llvm/lib/CodeGen/IfConversion.cpp
parent747482c5793b01b6866e198e64440fed8375a68f (diff)
downloadbcm5719-llvm-50954fb3e164cc59387ef0887c703dcc70f331db.tar.gz
bcm5719-llvm-50954fb3e164cc59387ef0887c703dcc70f331db.zip
If-converter models predicated defs as read + write. The read should be marked as 'undef' since it may not already be live. This appeases -verify-machineinstrs.
llvm-svn: 157662
Diffstat (limited to 'llvm/lib/CodeGen/IfConversion.cpp')
-rw-r--r--llvm/lib/CodeGen/IfConversion.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp
index 75ae5b9c2c2..00ea3c599f6 100644
--- a/llvm/lib/CodeGen/IfConversion.cpp
+++ b/llvm/lib/CodeGen/IfConversion.cpp
@@ -993,7 +993,8 @@ static void UpdatePredRedefs(MachineInstr *MI, SmallSet<unsigned,4> &Redefs,
if (AddImpUse)
// Treat predicated update as read + write.
MI->addOperand(MachineOperand::CreateReg(Reg, false/*IsDef*/,
- true/*IsImp*/,false/*IsKill*/));
+ true/*IsImp*/,false/*IsKill*/,
+ false/*IsDead*/,true/*IsUndef*/));
} else {
Redefs.insert(Reg);
for (const uint16_t *SR = TRI->getSubRegisters(Reg); *SR; ++SR)
OpenPOWER on IntegriCloud