Skip to content

Instantly share code, notes, and snippets.

@SamB
Created February 4, 2022 22:38
Show Gist options
  • Save SamB/7ef839ced422c33da7fc10f7a8a3fd7e to your computer and use it in GitHub Desktop.
Save SamB/7ef839ced422c33da7fc10f7a8a3fd7e to your computer and use it in GitHub Desktop.
# 1 "<built-in>"
# 1 "/home/naesten/llvm-project/clang/test/CodeGen/RISCV/loop-vectorize.c"
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
// RUN: %clang_cc1 -triple riscv64 -target-feature +v -O1 -emit-llvm -o - %s \
// RUN: | FileCheck %s -check-prefix=CHECK-HAS-V
// RUN: %clang_cc1 -triple riscv64 -target-feature -v -O1 -emit-llvm -o - %s \
// RUN: | FileCheck %s -check-prefix=CHECK-NO-V
typedef __SIZE_TYPE__ size_t;
void daxpy(size_t n, double a, const double x[restrict static n], double y[restrict static n]) {
#pragma clang loop vectorize(enable)
#pragma clang loop vectorize_width(scalable)
#pragma clang loop vectorize_predicate(enable)
for (size_t i = 0; i < n; i++) {
y[i] = a * x[i] + y[i];
}
}
# Crash reproducer for clang version 15.0.0 (https://github.com/llvm/llvm-project.git 234e54bdd8c18f4725f4fdb3d2ee8fa4db7d8326)
# Driver args: "--target=riscv64" "-march=rv64gcv" "-O1" "-c" "/home/naesten/llvm-project/clang/test/CodeGen/RISCV/loop-vectorize.c"
# Original command: "/home/naesten/llvm-project/build/bin/clang-15" "-cc1" "-triple" "riscv64--" "-emit-obj" "--mrelax-relocations" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "loop-vectorize.c" "-mrelocation-model" "static" "-mframe-pointer=none" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-fno-verbose-asm" "-mconstructor-aliases" "-nostdsysteminc" "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d" "-target-feature" "+c" "-target-feature" "+v" "-target-feature" "+zvl128b" "-target-feature" "+zvl32b" "-target-feature" "+zvl64b" "-target-feature" "+relax" "-target-feature" "-save-restore" "-target-abi" "lp64d" "-msmall-data-limit" "8" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/home/naesten/llvm-project/build/bin" "-resource-dir" "/home/naesten/llvm-project/build/lib/clang/15.0.0" "-internal-isystem" "/home/naesten/llvm-project/build/lib/clang/15.0.0/include" "-internal-isystem" "/home/naesten/llvm-project/build/bin/../lib/clang-runtimes/riscv64/include" "-O1" "-fdebug-compilation-dir=/home/naesten/llvm-project/build/bin" "-ferror-limit" "19" "-fmessage-length=160" "-fno-signed-char" "-fgnuc-version=4.2.1" "-faddrsig" "-o" "loop-vectorize.o" "-x" "c" "/home/naesten/llvm-project/clang/test/CodeGen/RISCV/loop-vectorize.c"
"/home/naesten/llvm-project/build/bin/clang-15" "-cc1" "-triple" "riscv64--" "-emit-obj" "--mrelax-relocations" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "loop-vectorize.c" "-mrelocation-model" "static" "-mframe-pointer=none" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-fno-verbose-asm" "-mconstructor-aliases" "-nostdsysteminc" "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d" "-target-feature" "+c" "-target-feature" "+v" "-target-feature" "+zvl128b" "-target-feature" "+zvl32b" "-target-feature" "+zvl64b" "-target-feature" "+relax" "-target-feature" "-save-restore" "-target-abi" "lp64d" "-msmall-data-limit" "8" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/home/naesten/llvm-project/build/bin" "-O1" "-fdebug-compilation-dir=/home/naesten/llvm-project/build/bin" "-ferror-limit" "19" "-fmessage-length=160" "-fno-signed-char" "-fgnuc-version=4.2.1" "-faddrsig" "-x" "c" "loop-vectorize-103d97.c"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment