[all-commits] [llvm/llvm-project] b703f6: Add llvm.looptrap intrinsic.

Peter Collingbourne via All-commits all-commits at lists.llvm.org
Fri Feb 13 14:13:14 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b703f63697167b1cc3d68e6ef101c4fc8d4241a3
      https://github.com/llvm/llvm-project/commit/b703f63697167b1cc3d68e6ef101c4fc8d4241a3
  Author: Peter Collingbourne <pcc at google.com>
  Date:   2026-02-13 (Fri, 13 Feb 2026)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/Intrinsics.td
    M llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
    A llvm/test/Transforms/PreISelIntrinsicLowering/looptrap.ll

  Log Message:
  -----------
  Add llvm.looptrap intrinsic.

The '``llvm.looptrap``' intrinsic is equivalent to
``llvm.cond.loop(true)``, but is also considered to be ``noreturn``,
which enables certain optimizations by allowing the optimizer to
assume that a branch leading to a call to this intrinsic was not
taken. A late optimization pass will convert this intrinsic to either
``llvm.cond.loop(true)`` or ``llvm.cond.loop(pred)``, where ``pred``
is a predicate for a conditional branch leading to the intrinsic call,
if possible.

Reviewers: fmayer, vitalybuka

Pull Request: https://github.com/llvm/llvm-project/pull/181299



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list