[LV] Either get invariant condition OR vector condition.
authorFlorian Hahn <flo@fhahn.com>
Sun, 24 May 2020 13:14:43 +0000 (14:14 +0100)
committerFlorian Hahn <flo@fhahn.com>
Sun, 24 May 2020 16:16:42 +0000 (17:16 +0100)
commit0deab8a54fd8d83853740eb751ddba967ad514f7
treed4e5fe9edd55188b02e3cce301dfe8fd367a157c
parentd43fac052e16412a5dbd4e265064d6038dda9a89
[LV] Either get invariant condition OR vector condition.

Currently we unconditionally get the first lane of the condition
operand, even if we later use the full vector condition. This can result
in some unnecessary instructions being generated.

Suggested as follow-up in D80219.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/X86/optsize.ll
llvm/test/Transforms/LoopVectorize/float-minmax-instruction-flag.ll