aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ExpandVectorPredication.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-07-06 10:42:09 +0200
committerNikita Popov <npopov@redhat.com>2022-07-06 11:12:49 +0200
commitf96cb66d1931dc09be947502a3f1dccda933cc1b (patch)
tree622f5ac29c0dd2b0b44fcee79bddfc455d718ef4 /llvm/lib/CodeGen/ExpandVectorPredication.cpp
parente0af055741751eb31e15aa3768d2162ed004e56e (diff)
downloadllvm-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.cpp3
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