diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-07-01 00:05:37 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-07-01 00:05:37 +0000 |
| commit | 4f5e9f8207e6110472df5a378be99e5cd21ba1b4 (patch) | |
| tree | ab499a3c047c6d3f243fb56f55fc8c5fd4da00f1 /llvm | |
| parent | 2850b1be2efbc797a9f481f35cc897a04a7dbd68 (diff) | |
| download | bcm5719-llvm-4f5e9f8207e6110472df5a378be99e5cd21ba1b4.tar.gz bcm5719-llvm-4f5e9f8207e6110472df5a378be99e5cd21ba1b4.zip | |
AArch64: Follow-up to r212073
In r212073 I missed a call of `use_begin()` that assumed the wrong
semantics. It's not clear to me at all what this code does without the
fix, so I'm not sure how to write a testcase.
llvm-svn: 212075
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp b/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp index a4f3a90c405..9ebb73437b6 100644 --- a/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp +++ b/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp @@ -285,10 +285,10 @@ AArch64AddressTypePromotion::propagateSignExtension(Instructions &SExtInsts) { // assertion on the type as all involved sext operation may have not // been moved yet. while (!Inst->use_empty()) { - Value::use_iterator UseIt = Inst->use_begin(); - Instruction *UseInst = dyn_cast<Instruction>(*UseIt); - assert(UseInst && "Use of sext is not an Instruction!"); - UseInst->setOperand(UseIt->getOperandNo(), SExt); + Use &U = *Inst->use_begin(); + Instruction *User = dyn_cast<Instruction>(U.getUser()); + assert(User && "User of sext is not an Instruction!"); + User->setOperand(U.getOperandNo(), SExt); } ToRemove.insert(Inst); SExt->setOperand(0, Inst->getOperand(0)); |

