Skip to content

clang runs loop-idiom-vectorize at -O0 for AArch64, RISCV, and Hexagon #156787

@arsenm

Description

@arsenm

clang is apparently running the loop vectorizer at -O0, but only when targeting aarch64.

clang++ -O0 -target aarch64-pc-linux-gnu -c -o /dev/null -emit-llvm  -mllvm -print-pipeline-passes /tmp/test.cpp
verify,function(ee-instrument<>),always-inline,function(loop(loop-idiom-vectorize)),coro-cond(coro-early,cgscc(coro-split),coro-cleanup,globaldce),function(annotation-remarks),verify,BitcodeWriterPass

x86 is not running this pass:

clang++ -O0 -target x86_64-pc-linux-gnu -c -o /dev/null -emit-llvm  -mllvm -print-pipeline-passes /tmp/test.cpp
verify,function(ee-instrument<>),always-inline,coro-cond(coro-early,cgscc(coro-split),coro-cleanup,globaldce),function(annotation-remarks),verify,BitcodeWriterPass

Same for RISCV. Hexagon also runs extra passes, function(loop(hexagon-loop-idiom)),function(loop(hexagon-vlcr))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions