[llvm] [SandboxVec] Add BottomUpVec test flag to build regions from metadata. (PR #111904)
Jorge Gorbe Moya via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 15:12:42 PDT 2024
================
@@ -0,0 +1,16 @@
+; RUN: opt -disable-output --passes=sandbox-vectorizer \
+; RUN: -sbvec-passes=print-instruction-count \
+; RUN: -sbvec-use-regions-from-metadata %s | FileCheck %s
+
+define i8 @foo(i8 %v0, i8 %v1) {
+ %t0 = add i8 %v0, 1, !sandboxvec !0
----------------
slackito wrote:
llvm/unittests/SandboxIR/RegionTest.cpp has some tests that check the iterator range, but I don't think we have one with a non-contiguous range like that. The iterator for a Region goes over the `SetVector` of instructions that were added to the Region, not actually traversing the IR, so it should work. I can add another test case to the unit test in a separate patch if you think it's worth it.
https://github.com/llvm/llvm-project/pull/111904
More information about the llvm-commits
mailing list