This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add test case showing suboptimal BUILD_VECTOR lowering
ClosedPublic

Authored by frasercrmck on Jul 28 2021, 7:41 AM.

Details

Summary

The second test case added here was pointed out to me by @craig.topper
and shows how we "optimize" a two-element BUILD_VECTOR from being one
load from the constant pool to two loads from the constant pool.

The first test case shows that since materialization for the
floating-point +0.0 value is cheap and doesn't involve a load, the
optimization is more clearly beneficial here.

Diff Detail