[all-commits] [llvm/llvm-project] c98a8a: [HardwareLoops] Loop guard intrinsic to recognise ...

Sam Parker via All-commits all-commits at lists.llvm.org
Thu Sep 16 00:33:41 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c98a8a09b5eb04882dddd02346e5c3b4c90f038c
      https://github.com/llvm/llvm-project/commit/c98a8a09b5eb04882dddd02346e5c3b4c90f038c
  Author: Sam Parker <sam.parker at arm.com>
  Date:   2021-09-16 (Thu, 16 Sep 2021)

  Changed paths:
    M llvm/lib/CodeGen/HardwareLoops.cpp
    M llvm/test/Transforms/HardwareLoops/loop-guards.ll

  Log Message:
  -----------
  [HardwareLoops] Loop guard intrinsic to recognise zext

If a loop count was initially represented by a 32b unsigned int in C
then the hardware-loop pass can recognise the loop guard and insert
the llvm.test.set.loop.iterations intrinsic. If this was instead a
unsigned short/char then clang inserts a zext instruction to expand
the loop count to an i32. This patch adds the necessary pattern
matching to enable the use of lvm.test.set.loop.iterations in those
cases.

Patch by: sherwin-dc

Differential Revision: https://reviews.llvm.org/D109631




More information about the All-commits mailing list