[PATCH] D106701: [clang] Add -falign-loops=N where N is a power of 2

Luís Marques via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 24 07:13:38 PDT 2021


luismarques added a comment.

LGTM. I'll let someone familiar with the old option explicitly approve it.



================
Comment at: clang/test/Driver/falign-loops.c:6-7
+// RUN: %clang -### -falign-loops=5 %s 2>&1 | FileCheck %s --check-prefix=CHECK-5
+// RUN: %clang -### -falign-loops=8 %s 2>&1 | FileCheck %s --check-prefix=CHECK-8
+// RUN: %clang -### -falign-loops=65537 %s 2>&1 | FileCheck %s --check-prefix=CHECK-65537
+// RUN: %clang -### -falign-loops=a %s 2>&1 | FileCheck %s --check-prefix=CHECK-ERR-A
----------------
I would generally expect to see the `<= x` bound tested with `x` and `x+1`, not just `x+1`.


================
Comment at: llvm/test/CodeGen/RISCV/loop-alignment.ll:3-4
+; RUN: llc < %s -mtriple=riscv64 | FileCheck %s
+; RUN: llc < %s -mtriple=riscv64 -align-loops=16 | FileCheck %s -check-prefix=ALIGN_16
+; RUN: llc < %s -mtriple=riscv64 -align-loops=32 | FileCheck %s -check-prefix=ALIGN_32
+
----------------
Nit: it's a convention of the RISC-V backend codegen tests to wrap the RUN lines.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106701/new/

https://reviews.llvm.org/D106701



More information about the cfe-commits mailing list