diff options
author | antangelo <contact@antangelo.com> | 2024-11-26 20:22:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-26 20:22:25 -0500 |
commit | dd4844722d98a97edd180e20abd4e65e1e2dd9d7 (patch) | |
tree | 40322ce4c49184e4cf109164e5160746c2fd71ee /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | ea58410d0fd75c9dc6d395bba15e939ed7c35cb1 (diff) | |
download | llvm-dd4844722d98a97edd180e20abd4e65e1e2dd9d7.zip llvm-dd4844722d98a97edd180e20abd4e65e1e2dd9d7.tar.gz llvm-dd4844722d98a97edd180e20abd4e65e1e2dd9d7.tar.bz2 |
[SelectionDAG] Add generic implementation for @llvm.expect.with.probability when optimizations are disabled (#117459)
Handle \@llvm.expect.with.probability in SelectionDAGBuilder, FastISel,
and IntrinsicLowering in the same way \@llvm.expect is handled, where
the value is passed through as-is. This can be reached if the intrinsic
is used without optimizations, where it would otherwise be properly
transformed out.
Fixes #115411 for SelectionDAG. A similar patch is likely needed for
GlobalISel.
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index b431ecc..eede879 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -1456,7 +1456,8 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) { case Intrinsic::launder_invariant_group: case Intrinsic::strip_invariant_group: - case Intrinsic::expect: { + case Intrinsic::expect: + case Intrinsic::expect_with_probability: { Register ResultReg = getRegForValue(II->getArgOperand(0)); if (!ResultReg) return false; |