We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07ec6ca commit 253ac70Copy full SHA for 253ac70
tools/cgeist/Lib/CGCall.cc
@@ -8,6 +8,7 @@
8
9
#include "TypeUtils.h"
10
#include "clang-mlir.h"
11
+#include "mlir/Dialect/Arith/IR/Arith.h"
12
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
13
#include "utils.h"
14
#include "clang/Basic/Builtins.h"
@@ -435,6 +436,14 @@ MLIRScanner::EmitClangBuiltinCallExpr(clang::CallExpr *expr) {
435
436
}
437
return make_pair(nullptr, true);
438
439
+ case Builtin::BI__builtin_constant_p: {
440
+ auto resultType = getMLIRType(expr->getType());
441
+ llvm::errs() << "warning: assuming __builtin_constant_p to be false\n";
442
+ return make_pair(
443
+ ValueCategory(builder.create<arith::ConstantIntOp>(loc, 0, resultType),
444
+ /*isRef*/ false),
445
+ true);
446
+ }
447
default:
448
break;
449
0 commit comments