llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[FatLTO][UnifiedLTO] Unified lto pipeline sometimes misses running LowerMatrixIntrinsicsPass

Open mandlebug opened this issue 2 years ago • 3 comments

Problem is exposed when using -fenable-matrix with either -ffat-lto-objects or -funified-lto and performing a full lto link step. The matrix-types-spec test from test-site is a good example of the failure.

Eg for fat lto

clang++ -DNDEBUG  -O3 -fomit-frame-pointer -flto -ffat-lto-objects -fenable-matrix -o SingleSource/UnitTests/CMakeFiles/matrix-types-spec.dir/matrix-types-spec.cpp.o -c <testsuite-path>/SingleSource/UnitTests/matrix-types-spec.cpp

clang++ -O3 -fomit-frame-pointer -flto -ffat-lto-objects -fno-split-lto-unit -DNDEBUG -fenable-matrix SingleSource/UnitTests/CMakeFiles/matrix-types-spec.dir/matrix-types-spec.cpp.o -o SingleSource/UnitTests/matrix-types-spec

Link step crashes with the following output:

WidenVectorResult #0: t132: v9f64,ch = llvm.matrix.column.major.load t639, TargetConstant:i64<211>, FrameIndex:i64<33>, Constant:i64<3>, TargetConstant:i1<0>, TargetConstant:i32<3>, TargetConstant:i
32<3>                                                                                                                                                                                                 
                                                                                                                                                                                                      
LLVM ERROR: Do not know how to widen the result of this operator!      

mandlebug avatar Jan 10 '24 17:01 mandlebug

@ilovepi @ormris

mandlebug avatar Jan 10 '24 17:01 mandlebug

Looks like the -enable-matrix flag isn't being passed to the LTO driver. PR to follow.

ormris avatar Jan 11 '24 20:01 ormris

@llvm/issue-subscribers-clang-driver

Author: Sean Fertile (mandlebug)

Problem is exposed when using `-fenable-matrix` with either `-ffat-lto-objects` or `-funified-lto` and performing a full lto link step. The `matrix-types-spec` test from test-site is a good example of the failure.

Eg for fat lto

clang++ -DNDEBUG  -O3 -fomit-frame-pointer -flto -ffat-lto-objects -fenable-matrix -o SingleSource/UnitTests/CMakeFiles/matrix-types-spec.dir/matrix-types-spec.cpp.o -c &lt;testsuite-path&gt;/SingleSource/UnitTests/matrix-types-spec.cpp

clang++ -O3 -fomit-frame-pointer -flto -ffat-lto-objects -fno-split-lto-unit -DNDEBUG -fenable-matrix SingleSource/UnitTests/CMakeFiles/matrix-types-spec.dir/matrix-types-spec.cpp.o -o SingleSource/UnitTests/matrix-types-spec

Link step crashes with the following output:

WidenVectorResult #<!-- -->0: t132: v9f64,ch = llvm.matrix.column.major.load t639, TargetConstant:i64&lt;211&gt;, FrameIndex:i64&lt;33&gt;, Constant:i64&lt;3&gt;, TargetConstant:i1&lt;0&gt;, TargetConstant:i32&lt;3&gt;, TargetConstant:i
32&lt;3&gt;                                                                                                                                                                                                 
                                                                                                                                                                                                      
LLVM ERROR: Do not know how to widen the result of this operator!      

llvmbot avatar Jan 12 '24 00:01 llvmbot