error in backend: Do not know how to split the result of this operator!
I am seeing the following error building opencv:
SplitVectorResult #0: t41: v4i64 = PTRTOINT t64
fatal error: error in backend: Do not know how to split the result of this operator!
Reduced C++ test case:
// RUN: %clang_cc1 -triple aarch64-unknown-freebsd13 --mrelax-relocations -fhalf-no-semantic-interposition -target-feature +neon -target-feature +v8.2a -target-feature +fp-armv8 -target-feature +dotprod -target-feature +fullfp16 -target-feature +spe -target-feature +ssbs -target-feature +rcpc -target-feature +morello -target-feature +c64 -target-abi purecap -fallow-half-arguments-and-returns --compress-debug-sections=zlib -O2 -fvisibility-inlines-hidden -femulated-tls -pthread -vectorize-loops -vectorize-slp -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o - -S -Wimplicit-int -Wfatal-errors %s
int resizeGeneric__cn, resize_width, resize_xofs, resize_yofs, resize_src_step,
resize_dst_step;
float resize_alpha, resize_beta;
struct {
int width;
} typedef Size;
struct Mat {
Mat(int);
~Mat();
};
struct ParallelLoopBody {
virtual void operator()(const int &) const;
};
struct VResizeLinearVec_32s8u {
int operator()(const int **, char *, short *, int);
};
struct VResizeLinear {
typedef int buf_type;
void operator()(const buf_type **src, char *dst, short *beta, int width) {
const buf_type *S0 = src[0], *S1 = src[1];
VResizeLinearVec_32s8u vecOp;
int x = vecOp(src, dst, beta, width);
for (; x <= width; x += 4) {
dst[x] = beta[0] * S0[0] + beta[1] * S1[x];
dst[x + 1] = (beta[1] * S1[x + 1] >> 6) + 2 >> 2;
dst[x + 2] = (beta[1] * (S1[x + 2] >> 4) >> 6) + 2 >> 2;
dst[x + 3] = (beta[1] * (S1[x + 3] >> 4) >> 6) + 2 >> 2;
}
for (; width;)
;
}
};
struct resizeGeneric_Invoker : ParallelLoopBody {
resizeGeneric_Invoker(Mat, Mat, int *, int *, short *, short *, Size, Size,
int, int, int);
void operator()(const int &) const {
VResizeLinear vresize;
int rows;
short beta;
vresize((const int **)rows, 0, &beta, dsize.width);
}
Mat _beta;
Size dsize;
};
template <class, class>
void resizeGeneric_(Mat src, Mat dst, int *xofs, void *_alpha, int *yofs,
void *_beta, int, int, int ksize) {
Size ssize, dsize;
resizeGeneric_Invoker(src, dst, xofs, yofs, (short *)_alpha, (short *)_beta,
ssize, dsize, ksize, resizeGeneric__cn,
resizeGeneric__cn);
}
void resize() {
Mat src(resize_src_step), dst(resize_dst_step);
resizeGeneric_<int, int>(src, dst, &resize_xofs, &resize_alpha, &resize_yofs,
&resize_beta, 0, resize_width, 2);
}
IR testcase (this can almost certainly be reduced further)
; RUN: %clang_cc1 -triple aarch64-unknown-freebsd13 -emit-obj --mrelax-relocations -disable-free -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=non-leaf -fno-rounding-math -mconstructor-aliases -target-cpu rainier -target-feature +neon -target-feature +v8.2a -target-feature +fp-armv8 -target-feature +dotprod -target-feature +fullfp16 -target-feature +spe -target-feature +ssbs -target-feature +rcpc -target-feature +morello -target-feature +c64 -target-abi purecap -mllvm -cheri-cap-table-abi=pcrel -fallow-half-arguments-and-returns --compress-debug-sections=zlib -ffunction-sections -fdata-sections -sys-header-deps -O2 -fdeprecated-macro -ferror-limit 19 -fvisibility hidden -fvisibility-inlines-hidden -femulated-tls -pthread -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o - -x ir %s
; ModuleID = '/tmp/resize-3a9098-bugpoint-reduce.ll'
source_filename = "/tmp/resize-3a9098.cpp"
target datalayout = "e-m:e-pf200:128:128:128:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-A200-P200-G200"
target triple = "aarch64-unknown-freebsd13"
%"class.cv::Mat" = type { i32, i32, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, i8 addrspace(200)*, %"class.cv::MatAllocator" addrspace(200)*, %"struct.cv::UMatData" addrspace(200)*, %"struct.cv::MatSize", %"struct.cv::MatStep" }
%"class.cv::MatAllocator" = type { i32 (...) addrspace(200)* addrspace(200)* }
%"struct.cv::UMatData" = type { %"class.cv::MatAllocator" addrspace(200)*, %"class.cv::MatAllocator" addrspace(200)*, i32, i32, i8 addrspace(200)*, i8 addrspace(200)*, i64, i32, i8 addrspace(200)*, i8 addrspace(200)*, i32, i32, %"struct.cv::UMatData" addrspace(200)*, %"class.std::__1::shared_ptr" }
%"class.std::__1::shared_ptr" = type { i8 addrspace(200)*, %"class.std::__1::__shared_weak_count" addrspace(200)* }
%"class.std::__1::__shared_weak_count" = type { %"class.std::__1::__shared_count.base", i64 }
%"class.std::__1::__shared_count.base" = type <{ i32 (...) addrspace(200)* addrspace(200)*, i64 }>
%"struct.cv::MatSize" = type { i32 addrspace(200)* }
%"struct.cv::MatStep" = type { i64 addrspace(200)*, [2 x i64] }
%"class.cv::resizeGeneric_Invoker" = type <{ %"class.cv::ParallelLoopBody", %"class.cv::Mat", %"class.cv::Mat", i32 addrspace(200)*, i32 addrspace(200)*, i16 addrspace(200)*, i16 addrspace(200)*, %"class.cv::Size_", %"class.cv::Size_", i32, i32, i32, [4 x i8] }>
%"class.cv::ParallelLoopBody" = type { i32 (...) addrspace(200)* addrspace(200)* }
%"class.cv::Size_" = type { i32, i32 }
%"struct.cv::VResizeLinear" = type { i8 }
$_ZTVN2cv21resizeGeneric_InvokerINS_13HResizeLinearIhisLi2048ENS_21HResizeLinearVecU8_X4EEENS_13VResizeLinearIhisNS_11FixedPtCastIihLi22EEENS_22VResizeLinearVec_32s8uEEEEE = comdat any
@_ZZN2cv3hal6resizeEiPKhmiiPhmiiddiE10linear_tab = internal addrspace(200) global [8 x void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)*] [void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* bitcast (void () addrspace(200)* @_ZN2cvL14resizeGeneric_INS_13HResizeLinearIhisLi2048ENS_21HResizeLinearVecU8_X4EEENS_13VResizeLinearIhisNS_11FixedPtCastIihLi22EEENS_22VResizeLinearVec_32s8uEEEEEvRKNS_3MatERS9_PKiPKvSE_SG_iii to void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)*), void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* null, void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* undef, void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* undef, void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* null, void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* undef, void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* undef, void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* null], align 16
@_ZZN2cv3hal6resizeEiPKhmiiPhmiiddiE9cubic_tab = external dso_local addrspace(200) global [8 x void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)*], align 16
@_ZTVN2cv21resizeGeneric_InvokerINS_13HResizeLinearIhisLi2048ENS_21HResizeLinearVecU8_X4EEENS_13VResizeLinearIhisNS_11FixedPtCastIihLi22EEENS_22VResizeLinearVec_32s8uEEEEE = linkonce_odr hidden unnamed_addr addrspace(200) constant { [5 x i8 addrspace(200)*] } { [5 x i8 addrspace(200)*] [i8 addrspace(200)* null, i8 addrspace(200)* undef, i8 addrspace(200)* undef, i8 addrspace(200)* undef, i8 addrspace(200)* bitcast (void () addrspace(200)* @_ZNK2cv21resizeGeneric_InvokerINS_13HResizeLinearIhisLi2048ENS_21HResizeLinearVecU8_X4EEENS_13VResizeLinearIhisNS_11FixedPtCastIihLi22EEENS_22VResizeLinearVec_32s8uEEEEclERKNS_5RangeE to i8 addrspace(200)*)] }, comdat, align 16
define void @_ZN2cv3hal6resizeEiPKhmiiPhmiiddi(i32 %src_type, i32 %interpolation) addrspace(200) personality i8 addrspace(200)* undef {
entry:
%func395 = alloca void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)*, align 16, addrspace(200)
br label %do.body
do.body: ; preds = %entry
br label %land.lhs.true
land.lhs.true: ; preds = %do.body
br label %if.then
if.then: ; preds = %land.lhs.true
br label %if.end
if.end: ; preds = %if.then
br label %do.cond
do.cond: ; preds = %if.end
br label %do.end
do.end: ; preds = %do.cond
br label %if.then10
if.then10: ; preds = %do.end
br label %if.end15
if.end15: ; preds = %if.then10
br label %cond.true
cond.true: ; preds = %if.end15
br label %cond.false
cond.false: ; preds = %cond.true
br label %cond.end
cond.end: ; preds = %cond.false
br label %cond.end139
cond.end139: ; preds = %cond.end
br label %if.else143
if.else143: ; preds = %cond.end139
br label %if.end150
if.end150: ; preds = %if.else143
br label %if.end151
if.end151: ; preds = %if.end150
br label %invoke.cont157
invoke.cont157: ; preds = %if.end151
br label %invoke.cont161
invoke.cont161: ; preds = %invoke.cont157
br label %invoke.cont163
invoke.cont163: ; preds = %invoke.cont161
br label %do.body164
do.body164: ; preds = %invoke.cont163
br label %invoke.cont165
invoke.cont165: ; preds = %do.body164
br label %if.then167
if.then167: ; preds = %invoke.cont165
br label %if.end173
if.end173: ; preds = %if.then167
br label %do.cond174
do.cond174: ; preds = %if.end173
br label %do.end175
do.end175: ; preds = %do.cond174
br label %invoke.cont178
invoke.cont178: ; preds = %do.end175
br label %invoke.cont180
invoke.cont180: ; preds = %invoke.cont178
br label %land.end
land.end: ; preds = %invoke.cont180
br label %invoke.cont190
invoke.cont190: ; preds = %land.end
br label %invoke.cont191
invoke.cont191: ; preds = %invoke.cont190
br label %invoke.cont194
invoke.cont194: ; preds = %invoke.cont191
br label %if.end219
if.end219: ; preds = %invoke.cont194
br label %if.end223
if.end223: ; preds = %if.end219
br label %if.end227
if.end227: ; preds = %if.end223
br label %if.end236
if.end236: ; preds = %if.end227
br label %if.end386
if.end386: ; preds = %if.end236
br i1 undef, label %if.then397, label %if.else400
if.then397: ; preds = %if.end386
br label %if.end420
if.else400: ; preds = %if.end386
br label %if.else405
if.else405: ; preds = %if.else400
br label %if.then409
if.then409: ; preds = %if.else405
%arrayidx411 = getelementptr inbounds [8 x void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)*], [8 x void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)*] addrspace(200)* @_ZZN2cv3hal6resizeEiPKhmiiPhmiiddiE10linear_tab, i64 0, i64 undef
%0 = load void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)*, void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* addrspace(200)* %arrayidx411, align 16
store void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* %0, void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* addrspace(200)* %func395, align 16
br label %if.end418
if.end418: ; preds = %if.then409
br label %if.end419
if.end419: ; preds = %if.end418
br label %if.end420
if.end420: ; preds = %if.end419, %if.then397
br label %do.body422
do.body422: ; preds = %if.end420
%1 = load void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)*, void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* addrspace(200)* %func395, align 16
%cmp423 = icmp ne void (%"class.cv::Mat" addrspace(200)*, %"class.cv::Mat" addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32 addrspace(200)*, i8 addrspace(200)*, i32, i32, i32) addrspace(200)* %1, null
br i1 %cmp423, label %if.then424, label %if.else425
if.then424: ; preds = %do.body422
ret void
if.else425: ; preds = %do.body422
br label %invoke.cont427
invoke.cont427: ; preds = %if.else425
br label %invoke.cont429
invoke.cont429: ; preds = %invoke.cont427
unreachable
}
declare void @_ZN2cv5utils5trace7details6RegionC1ERKNS3_21LocationStaticStorageE() unnamed_addr addrspace(200)
declare hidden void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2IDnEEPKc() unnamed_addr addrspace(200) align 2
declare hidden double @_Z3absd() addrspace(200)
declare i32 @_ZN2cvL13saturate_castIiEET_d() addrspace(200)
declare hidden void @_ZN2cv5Size_IiEC2Eii() unnamed_addr addrspace(200) align 2
declare hidden i1 @_ZNK2cv5Size_IiE5emptyEv() addrspace(200) align 2
define internal void @_ZN2cvL14resizeGeneric_INS_13HResizeLinearIhisLi2048ENS_21HResizeLinearVecU8_X4EEENS_13VResizeLinearIhisNS_11FixedPtCastIihLi22EEENS_22VResizeLinearVec_32s8uEEEEEvRKNS_3MatERS9_PKiPKvSE_SG_iii() addrspace(200) personality i8 addrspace(200)* undef {
entry:
call void @_ZN2cv21resizeGeneric_InvokerINS_13HResizeLinearIhisLi2048ENS_21HResizeLinearVecU8_X4EEENS_13VResizeLinearIhisNS_11FixedPtCastIihLi22EEENS_22VResizeLinearVec_32s8uEEEEC2ERKNS_3MatERSA_PKiSF_PKsSH_RKNS_5Size_IiEESL_iii(%"class.cv::resizeGeneric_Invoker" addrspace(200)* undef)
ret void
}
declare void @_ZN2cv3MatC1ENS_5Size_IiEEiPvm() unnamed_addr addrspace(200)
; Function Attrs: argmemonly nofree nosync nounwind willreturn
declare void @llvm.memcpy.p200i8.p200i8.i64(i8 addrspace(200)* noalias nocapture writeonly, i8 addrspace(200)* noalias nocapture readonly, i64, i1 immarg) addrspace(200) #0
declare hidden void @_ZN2cv10AutoBufferIiLm264EEC2Em() unnamed_addr addrspace(200) align 2
; Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
declare void @llvm.memset.p200i8.i64(i8 addrspace(200)* nocapture writeonly, i8, i64, i1 immarg) addrspace(200) #1
declare hidden i64 @_ZNK2cv7MatStepcvmEv() addrspace(200) align 2
declare hidden i64 @_ZNK2cv7MatSizeclEv() addrspace(200) align 2
declare hidden void @_ZN2cv5RangeC2Eii() unnamed_addr addrspace(200) align 2
declare hidden void @_ZN2cv16ParallelLoopBodyC2Ev() unnamed_addr addrspace(200) align 2
declare hidden i32 @_ZNK2cv3Mat8channelsEv() addrspace(200) align 2
; Function Attrs: noinline
define linkonce_odr hidden void @_ZN2cv21resizeGeneric_InvokerINS_13HResizeLinearIhisLi2048ENS_21HResizeLinearVecU8_X4EEENS_13VResizeLinearIhisNS_11FixedPtCastIihLi22EEENS_22VResizeLinearVec_32s8uEEEEC2ERKNS_3MatERSA_PKiSF_PKsSH_RKNS_5Size_IiEESL_iii(%"class.cv::resizeGeneric_Invoker" addrspace(200)* %this) unnamed_addr addrspace(200) #2 align 2 personality i8 addrspace(200)* undef {
entry:
%this.addr = alloca %"class.cv::resizeGeneric_Invoker" addrspace(200)*, align 16, addrspace(200)
store %"class.cv::resizeGeneric_Invoker" addrspace(200)* %this, %"class.cv::resizeGeneric_Invoker" addrspace(200)* addrspace(200)* %this.addr, align 16
%this1 = load %"class.cv::resizeGeneric_Invoker" addrspace(200)*, %"class.cv::resizeGeneric_Invoker" addrspace(200)* addrspace(200)* %this.addr, align 16
%0 = bitcast %"class.cv::resizeGeneric_Invoker" addrspace(200)* %this1 to i32 (...) addrspace(200)* addrspace(200)* addrspace(200)*
store i32 (...) addrspace(200)* addrspace(200)* bitcast (i8 addrspace(200)* addrspace(200)* getelementptr inbounds ({ [5 x i8 addrspace(200)*] }, { [5 x i8 addrspace(200)*] } addrspace(200)* @_ZTVN2cv21resizeGeneric_InvokerINS_13HResizeLinearIhisLi2048ENS_21HResizeLinearVecU8_X4EEENS_13VResizeLinearIhisNS_11FixedPtCastIihLi22EEENS_22VResizeLinearVec_32s8uEEEEE, i32 0, inrange i32 0, i32 2) to i32 (...) addrspace(200)* addrspace(200)*), i32 (...) addrspace(200)* addrspace(200)* addrspace(200)* %0, align 16
ret void
}
define linkonce_odr hidden void @_ZNK2cv21resizeGeneric_InvokerINS_13HResizeLinearIhisLi2048ENS_21HResizeLinearVecU8_X4EEENS_13VResizeLinearIhisNS_11FixedPtCastIihLi22EEENS_22VResizeLinearVec_32s8uEEEEclERKNS_5RangeE() unnamed_addr addrspace(200) align 2 personality i8 addrspace(200)* undef {
entry:
br label %for.cond
for.cond: ; preds = %entry
br label %for.end
for.end: ; preds = %for.cond
br label %for.cond15
for.cond15: ; preds = %for.end
br label %for.body17
for.body17: ; preds = %for.cond15
br label %for.cond23
for.cond23: ; preds = %for.body17
br label %for.end66
lpad: ; preds = %if.end82
%0 = landingpad { i8 addrspace(200)*, i32 }
cleanup
ret void
for.end66: ; preds = %for.cond23
br label %if.end82
if.end82: ; preds = %for.end66
invoke void bitcast (void (i32 addrspace(200)* addrspace(200)*, i8 addrspace(200)*, i32) addrspace(200)* @_ZNK2cv13VResizeLinearIhisNS_11FixedPtCastIihLi22EEENS_22VResizeLinearVec_32s8uEEclEPPKiPhPKsi to void (%"struct.cv::VResizeLinear" addrspace(200)*, i32 addrspace(200)* addrspace(200)*, i8 addrspace(200)*, i16 addrspace(200)*, i32) addrspace(200)*)(%"struct.cv::VResizeLinear" addrspace(200)* undef, i32 addrspace(200)* addrspace(200)* undef, i8 addrspace(200)* undef, i16 addrspace(200)* undef, i32 undef)
to label %invoke.cont91 unwind label %lpad
invoke.cont91: ; preds = %if.end82
ret void
}
declare i64 @_ZN2cvL9alignSizeEmi() addrspace(200)
define linkonce_odr hidden void @_ZNK2cv13VResizeLinearIhisNS_11FixedPtCastIihLi22EEENS_22VResizeLinearVec_32s8uEEclEPPKiPhPKsi(i32 addrspace(200)* addrspace(200)* %src, i8 addrspace(200)* %dst, i32 %width) addrspace(200) align 2 {
entry:
%dst.addr = alloca i8 addrspace(200)*, align 16, addrspace(200)
%width.addr = alloca i32, align 4, addrspace(200)
%x = alloca i32, align 4, addrspace(200)
store i8 addrspace(200)* %dst, i8 addrspace(200)* addrspace(200)* %dst.addr, align 16
store i32 %width, i32 addrspace(200)* %width.addr, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%0 = load i32, i32 addrspace(200)* %x, align 4
%1 = load i32, i32 addrspace(200)* %width.addr, align 4
%sub = sub nsw i32 %1, 4
%cmp = icmp sle i32 %0, %sub
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%shr16 = ashr i32 undef, 2
%conv17 = trunc i32 %shr16 to i8
%2 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %dst.addr, align 16
%3 = load i32, i32 addrspace(200)* %x, align 4
%add18 = add nsw i32 %3, 0
%idxprom19 = sext i32 %add18 to i64
%arrayidx20 = getelementptr inbounds i8, i8 addrspace(200)* %2, i64 %idxprom19
store i8 %conv17, i8 addrspace(200)* %arrayidx20, align 1
%shr37 = ashr i32 undef, 2
%conv38 = trunc i32 %shr37 to i8
%4 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %dst.addr, align 16
%5 = load i32, i32 addrspace(200)* %x, align 4
%add39 = add nsw i32 %5, 1
%idxprom40 = sext i32 %add39 to i64
%arrayidx41 = getelementptr inbounds i8, i8 addrspace(200)* %4, i64 %idxprom40
store i8 %conv38, i8 addrspace(200)* %arrayidx41, align 1
%shr58 = ashr i32 undef, 2
%conv59 = trunc i32 %shr58 to i8
%6 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %dst.addr, align 16
%7 = load i32, i32 addrspace(200)* %x, align 4
%add60 = add nsw i32 %7, 2
%idxprom61 = sext i32 %add60 to i64
%arrayidx62 = getelementptr inbounds i8, i8 addrspace(200)* %6, i64 %idxprom61
store i8 %conv59, i8 addrspace(200)* %arrayidx62, align 1
%shr79 = ashr i32 undef, 2
%conv80 = trunc i32 %shr79 to i8
%8 = load i8 addrspace(200)*, i8 addrspace(200)* addrspace(200)* %dst.addr, align 16
%9 = load i32, i32 addrspace(200)* %x, align 4
%add81 = add nsw i32 %9, 3
%idxprom82 = sext i32 %add81 to i64
%arrayidx83 = getelementptr inbounds i8, i8 addrspace(200)* %8, i64 %idxprom82
store i8 %conv80, i8 addrspace(200)* %arrayidx83, align 1
br label %for.inc
for.inc: ; preds = %for.body
%10 = load i32, i32 addrspace(200)* %x, align 4
%add84 = add nsw i32 %10, 4
store i32 %add84, i32 addrspace(200)* %x, align 4
br label %for.cond, !llvm.loop !0
for.end: ; preds = %for.cond
ret void
}
declare hidden i32 @_ZNK2cv22VResizeLinearVec_32s8uclEPPKiPhPKsi() addrspace(200) align 2
attributes #0 = { argmemonly nofree nosync nounwind willreturn }
attributes #1 = { argmemonly nofree nosync nounwind willreturn writeonly }
attributes #2 = { noinline }
!0 = distinct !{!0, !1}
!1 = !{!"llvm.loop.mustprogress"}
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information