================
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned
BuiltinID,
Intrinsic::ID ID = Intrinsic::not_intrinsic;
+#include "llvm/TargetParser/PPCTargetParser.def"
+ auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op,
+ unsigned Op_Value) -> Value * {
+ Value *Value1 = FieldValue;
+ if (Mask)
+ Value1 = Builder.CreateAnd(Value1, Mask);
+ assert((Op == OP_EQ) && "Only support equal comparision");
+ return Builder.CreateICmp(ICmpInst::ICMP_EQ, FieldValue,
+ ConstantInt::get(Int32Ty, Op_Value));
+ };
+
+ auto ConvBuiltinCpu = [&](unsigned SupportOP, unsigned FieldIdx,
+ unsigned Op_Mask, unsigned Op,
+ unsigned Op_Value) -> Value * {
+ if (SupportOP == AIX_BUILTIN_PPC_FALSE)
+ return llvm::ConstantInt::getFalse(ConvertType(E->getType()));
----------------
amy-kwan wrote:
Pull out `E->getType()` since it's used more than once.
https://github.com/llvm/llvm-project/pull/80069
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits