craig.topper added inline comments.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:7414
+ StringRef FeatureStr = cast<StringLiteral>(FeatureExpr)->getString();
+ return EmitX86CpuSupports({FeatureStr});
+}
----------------
You shouldn't need curly braces here. ArrayRef has a conversion constructor
that should take care of this.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:7456
+
+ unsigned FeaturesMask = 0;
+
----------------
Declare as uint32_t?
================
Comment at: lib/CodeGen/CGBuiltin.cpp:7494
+ assert(Feature != X86Features::MAX && "Invalid feature!");
+ FeaturesMask |= (1ULL << Feature);
+ }
----------------
No need for 64-bit OR here. FeaturesMask is only 32-bits.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:7525
const CallExpr *E) {
+ if (BuiltinID == X86::BI__builtin_cpu_is)
+ return EmitX86CpuIs(E);
----------------
I think you have the builtin handline at the top and in the switch. Bad rebase?
https://reviews.llvm.org/D36707
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits