llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.41k stars 12.15k forks source link

[SVE] Missing combine optimaztion related to incw #58995

Closed vfdff closed 1 year ago

vfdff commented 2 years ago
llvmbot commented 2 years ago

@llvm/issue-subscribers-backend-aarch64

vfdff commented 2 years ago

may be similar to https://discourse.llvm.org/t/arm-sve-zi-instructions-would-not-be-selected-in-loop-bodies-sveallactive-cannot-see-through-bb-boundaries/65113, part insturctions moved out of the loop body, then missing combine as values across basic blocks.

vfdff commented 2 years ago

it crashes when I try with -global-isel (but ok with -global-isel-abort=0)

PeixinQiao commented 1 year ago

it crashes when I try with -global-isel (but ok with -global-isel-abort=0)

  • clang -march=armv9-a+sve2 -O3 -w ../test.c -S -mllvm -print-after-all -O2 -march=armv9-a+sve2 -mllvm -prefer-predicate-over-epilogue=predicate-else-scalar-epilogue -Xclang -target-feature -Xclang +use-scalar-inc-vl -mllvm -global-isel

GlobalSel does not support ScalableVectorType, yet. Check https://github.com/llvm/llvm-project/blob/19c42f672f942518b4d711a0c734693a9244f78c/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp#L23123-L23125. The original PR is https://reviews.llvm.org/D81557.

vfdff commented 1 year ago

maybe fixed by https://github.com/llvm/llvm-project/pull/70304

vfdff commented 1 year ago

close this issue as the https://github.com/llvm/llvm-project/pull/70304 fixed this issue indeed with local check