[SVE] Suppress vselect warning from incorrect interface call
authorNashe Mncube <nashe.mncube@arm.com>
Mon, 8 Mar 2021 09:37:56 +0000 (09:37 +0000)
committerNashe Mncube <nashe.mncube@arm.com>
Wed, 24 Mar 2021 14:34:34 +0000 (14:34 +0000)
commitac2a1e959690e8e5243db878bfd114b72a8c4be5
treee1e19149767533e2a978ee4b7362340d5d005d88
parent40653c8bb92c358137045e5610a713a9e00f6c14
[SVE] Suppress vselect warning from incorrect interface call

The VSelectCombine handler within AArch64ISelLowering,
uses an interface call which only expects fixed vectors.
This generates a warning when the call is made on a
scalable vector. This warning has been suppressed with this change,
by using the ElementCount interface, which supports both fixed and scalable vectors.
I have also added a regression test which recreates the warning.

Differential Revision: https://reviews.llvm.org/D98249
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/test/CodeGen/AArch64/sve-cmp-select.ll [new file with mode: 0644]