diff options
Diffstat (limited to 'llvm/lib/Target/ARM/MVELaneInterleavingPass.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/MVELaneInterleavingPass.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/MVELaneInterleavingPass.cpp b/llvm/lib/Target/ARM/MVELaneInterleavingPass.cpp index 538bd10685b0..3e76efb5133f 100644 --- a/llvm/lib/Target/ARM/MVELaneInterleavingPass.cpp +++ b/llvm/lib/Target/ARM/MVELaneInterleavingPass.cpp @@ -45,6 +45,7 @@ #include "ARM.h" #include "ARMBaseInstrInfo.h" #include "ARMSubtarget.h" +#include "llvm/ADT/SetVector.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/CodeGen/TargetLowering.h" #include "llvm/CodeGen/TargetPassConfig.h" @@ -176,9 +177,8 @@ static bool tryInterleave(Instruction *Start, // Truncs case Instruction::Trunc: case Instruction::FPTrunc: - if (Truncs.count(I)) + if (!Truncs.insert(I)) continue; - Truncs.insert(I); Visited.insert(I); break; @@ -235,9 +235,8 @@ static bool tryInterleave(Instruction *Start, case Instruction::FAdd: case Instruction::FMul: case Instruction::Select: - if (Ops.count(I)) + if (!Ops.insert(I)) continue; - Ops.insert(I); for (Use &Op : I->operands()) { if (!isa<FixedVectorType>(Op->getType())) |
