[PATCH] D128033: [LoopVectorize] Fix createInductionResumeValues

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 11:09:30 PDT 2022


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM with the suggested improvements by @david-arm for the tests.  It would also increase the readability of the test if the blocks could be ordered so that the loop structure is a bit clearer, with more descriptive block names.

I don't think this is a complete fix (ideally the steps would also expanded before modifying the CFG at all), but it is a straight-forward improvement to fix an existing crash.

As for the title, it would be great if it would explain what issues it fixes.



================
Comment at: llvm/test/Transforms/LoopVectorize/create-induction-resume.ll:5
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
+target triple = "x86_64-unknown-linux-gnu"
+define void @hoge(i32 %arg) {
----------------
Does the test depend on x86? If so, it needs to be moved to the X86 subdirectory, otherwise it may fail on targets that don't build the backend. 

If `-force-vector-with=x` and `-force-vector-interleave=x` are sufficient, it would be good to remove the triple.


================
Comment at: llvm/test/Transforms/LoopVectorize/create-induction-resume.ll:6
+target triple = "x86_64-unknown-linux-gnu"
+define void @hoge(i32 %arg) {
+; CHECK-LABEL: @hoge(
----------------
It might be good to include a reference to the bug here


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

https://reviews.llvm.org/D128033



More information about the llvm-commits mailing list