diff options
author | Nikita Popov <npopov@redhat.com> | 2022-07-06 10:42:09 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-07-06 11:12:49 +0200 |
commit | f96cb66d1931dc09be947502a3f1dccda933cc1b (patch) | |
tree | 622f5ac29c0dd2b0b44fcee79bddfc455d718ef4 /llvm/lib/CodeGen/ExpandVectorPredication.cpp | |
parent | e0af055741751eb31e15aa3768d2162ed004e56e (diff) | |
download | llvm-f96cb66d1931dc09be947502a3f1dccda933cc1b.zip llvm-f96cb66d1931dc09be947502a3f1dccda933cc1b.tar.gz llvm-f96cb66d1931dc09be947502a3f1dccda933cc1b.tar.bz2 |
[ValueTracking] Accept Instruction in isSafeToSpeculativelyExecute() (NFC)
As constant expressions can no longer trap, it only makes sense to
call isSafeToSpeculativelyExecute on Instructions, so limit the
API to accept only them, rather than general Operators or Values.
Diffstat (limited to 'llvm/lib/CodeGen/ExpandVectorPredication.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ExpandVectorPredication.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ExpandVectorPredication.cpp b/llvm/lib/CodeGen/ExpandVectorPredication.cpp index 7883a48..59932a5 100644 --- a/llvm/lib/CodeGen/ExpandVectorPredication.cpp +++ b/llvm/lib/CodeGen/ExpandVectorPredication.cpp @@ -120,8 +120,7 @@ static bool maySpeculateLanes(VPIntrinsic &VPI) { // Fallback to whether the intrinsic is speculatable. Optional<unsigned> OpcOpt = VPI.getFunctionalOpcode(); unsigned FunctionalOpc = OpcOpt.value_or((unsigned)Instruction::Call); - return isSafeToSpeculativelyExecuteWithOpcode(FunctionalOpc, - cast<Operator>(&VPI)); + return isSafeToSpeculativelyExecuteWithOpcode(FunctionalOpc, &VPI); } //// } Helpers |