[LV] Set debug loc after setting insert point.
authorFlorian Hahn <flo@fhahn.com>
Fri, 8 Apr 2022 18:34:40 +0000 (20:34 +0200)
committerFlorian Hahn <flo@fhahn.com>
Fri, 8 Apr 2022 18:34:40 +0000 (20:34 +0200)
commit467dbcd9f142f3995afb5a6ad7cccb7347caf2ff
tree7d7aaebbabb6ca023618b98ddf7bf0bcc4d9525c
parent4c0d5db9c946c0ce462754b81147d36f00250cfc
[LV] Set debug loc after setting insert point.

This fixes the code to actually use the location of the instruction, if
available. Previously, SetInsertPoint would overwrite the insert point
set from the instruction.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/debugloc.ll