[GVN] Fix VNCoercion for Scalable Vector.
authorHuihui Zhang <huihuiz@quicinc.com>
Sat, 11 Apr 2020 00:48:56 +0000 (17:48 -0700)
committerHuihui Zhang <huihuiz@quicinc.com>
Sat, 11 Apr 2020 00:49:07 +0000 (17:49 -0700)
commit6e7eeb44b305391f736437d050729b09c02fda0f
tree6f2cd52af5b59185bd6b3d7556353f839e4f5577
parent15000650a6d2e501eb521e0d94e6ea6fa6b16609
[GVN] Fix VNCoercion for Scalable Vector.

Summary:
For VNCoercion, skip scalable vector when analysis rely on fixed size,
otherwise call TypeSize::getFixedSize() explicitly.

Add unit tests to check funtionality of GVN load elimination for scalable type.

Reviewers: sdesmalen, efriedma, spatel, fhahn, reames, apazos, ctetreau

Reviewed By: efriedma

Subscribers: bjope, hiraditya, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76944
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/lib/Transforms/Utils/VNCoercion.cpp
llvm/test/Transforms/GVN/vscale.ll [new file with mode: 0644]