[PATCH] D33055: [LoopOptimizer][Fix]PR32859, PR24738

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 10 10:42:34 PDT 2017


davide added a comment.

Can you explain your fix? Why replacing `undef` with `0` just works?



================
Comment at: test/Transforms/LoopVectorize/pr32859.ll:1-2
+; RUN: opt < %s -inline -sroa -jump-threading -lcssa -loop-rotate -loop-vectorize -loop-unroll -S 2>&1 | FileCheck %s
+
+; CHECK-LABEL: for.cond.preheader:
----------------
This is, unfortunately, really really brittle.
You may want to rewrite this to only run `-loop-vectorize`.


================
Comment at: test/Transforms/LoopVectorize/pr32859.ll:143-154
+attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { argmemonly nounwind }
+attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #3 = { nounwind }
+
+!llvm.ident = !{!0}
+
----------------
This test can be greatly reduced using bugpoint and or delta. For example, I think all these lines (attributes/metadata) aren't really needed).


https://reviews.llvm.org/D33055





More information about the llvm-commits mailing list