mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[AArch64] SVEIntrinsicOpts - use range loop and cast<> instead of dyn_cast<> for dereferenced pointer. NFCI.
Don't directly dereference a dyn_cast<> - use cast<> so we assert for the correct type. Also, simplify the for loop to a range loop. Fixes clang static analyzer warning.
This commit is contained in:
parent
5c92d5189c
commit
89fb4f312e
@ -248,10 +248,8 @@ bool SVEIntrinsicOpts::runOnModule(Module &M) {
|
||||
case Intrinsic::aarch64_sve_ptest_any:
|
||||
case Intrinsic::aarch64_sve_ptest_first:
|
||||
case Intrinsic::aarch64_sve_ptest_last:
|
||||
for (auto I = F.user_begin(), E = F.user_end(); I != E;) {
|
||||
auto *Inst = dyn_cast<Instruction>(*I++);
|
||||
Functions.insert(Inst->getFunction());
|
||||
}
|
||||
for (User *U : F.users())
|
||||
Functions.insert(cast<Instruction>(U)->getFunction());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user