We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6dd5eb commit 763f6d4Copy full SHA for 763f6d4
llvm/lib/Target/SPIRV/SPIRVPreLegalizerCombiner.cpp
@@ -50,6 +50,14 @@ namespace {
50
#include "SPIRVGenPreLegalizeGICombiner.inc"
51
#undef GET_GICOMBINER_TYPES
52
53
+/// This match is part of a combine that
54
+/// rewrites length(X - Y) to distance(X, Y)
55
+/// (f32 (g_intrinsic length
56
+/// (g_fsub (vXf32 X) (vXf32 Y))))
57
+/// ->
58
+/// (f32 (g_intrinsic distance
59
+/// (vXf32 X) (vXf32 Y)))
60
+///
61
bool matchLengthToDistance(MachineInstr &MI, MachineRegisterInfo &MRI) {
62
if (MI.getOpcode() != TargetOpcode::G_INTRINSIC ||
63
cast<GIntrinsic>(MI).getIntrinsicID() != Intrinsic::spv_length)
0 commit comments