[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

Amy Kwan via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 08:48:09 PST 2024


================
@@ -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");
----------------
amy-kwan wrote:

```suggestion
    assert((Op == OP_EQ) && "Only equal comparisons are supported");
```
Also fixed a typo.

https://github.com/llvm/llvm-project/pull/80069


More information about the llvm-commits mailing list