pengfei added inline comments.
================ Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13272 + uint64_t Mask = llvm::X86::getCpuSupportsMask(FeatureStrs); + uint32_t FeaturesMask[4] = {uint32_t(Mask), uint32_t(Mask >> 32), 0, 0}; + return EmitX86CpuSupports(FeaturesMask); ---------------- Use `Lo_32(Mask)`, `Hi_32(Mask)`? ================ Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13318-13320 + Value *Idxs[] = {Builder.getInt32(0), Builder.getInt32(i - 1)}; + Value *Features = Builder.CreateAlignedLoad( + Int32Ty, Builder.CreateGEP(ATy, CpuFeatures2, Idxs), ---------------- Do we have problem when linking with old version of libgcc? ================ Comment at: compiler-rt/lib/builtins/cpu_model.c:808 + if (HasExtLeaf1) { + if (ECX & 1) + setFeature(FEATURE_LAHF_LM); ---------------- Can we reuse bit defination in cpuid.h, e.g., `if (ECX & bit_LAHF_LM)`? The same below. ================ Comment at: compiler-rt/lib/builtins/cpu_model.c:808 + if (HasExtLeaf1) { + if (ECX & 1) + setFeature(FEATURE_LAHF_LM); ---------------- pengfei wrote: > Can we reuse bit defination in cpuid.h, e.g., `if (ECX & bit_LAHF_LM)`? The > same below. Can we reuse bit defination in cpuid.h, e.g., `if (ECX & bit_LAHF_LM)`? The same below. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158329/new/ https://reviews.llvm.org/D158329 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits