Skip to content

Commit dbf19f6

Browse files
adding spirv codegen
1 parent 91cff1b commit dbf19f6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18994,7 +18994,29 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
1899418994

1899518995
EmitWritebacks(*this, Args);
1899618996
return s;
18997+
}
18998+
18999+
19000+
if(!Op0->getType()->isVectorTy()){
19001+
FixedVectorType *destTy = FixedVectorType::get(Int32Ty, 2);
19002+
Value *bitcast = Builder.CreateBitCast(Op0, destTy);
19003+
19004+
Value *arg0 = Builder.CreateExtractElement(bitcast, 0.0);
19005+
Value *arg1 = Builder.CreateExtractElement(bitcast, 1.0);
19006+
19007+
Builder.CreateStore(arg0, Op1TmpLValue.getAddress());
19008+
auto *s = Builder.CreateStore(arg1, Op2TmpLValue.getAddress());
19009+
19010+
EmitWritebacks(*this, Args);
19011+
return s;
19012+
}
19013+
19014+
auto *Op0VecTy = E->getArg(0)->getType()->getAs<VectorType>();
19015+
19016+
for(int idx = 0 ; idx < Op0VecTy -> getNumElements(); idx += 2){
19017+
1899719018
}
19019+
1899819020
}
1899919021
}
1900019022
return nullptr;

0 commit comments

Comments
 (0)