[PATCH] D86229: [X86] Enable constexpr on POPCNT intrinsics (PR31446)

Simon Pilgrim via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 19 12:10:20 PDT 2020


RKSimon added inline comments.


================
Comment at: clang/test/CodeGen/popcnt-builtins.cpp:3
+// RUN: %clang_cc1 -std=c++11 -ffreestanding %s -triple=x86_64-apple-darwin -emit-llvm -o - | FileCheck %s
+
+
----------------
arsenm wrote:
> RKSimon wrote:
> > craig.topper wrote:
> > > RKSimon wrote:
> > > > arsenm wrote:
> > > > > Missing required register target?
> > > > sure, oddly we don't appear to do this for most of the x86 builtins codegen tests - I'll see if I can cleanup those soon
> > > Do we need a registered target if we're stopping at IR generation?
> > Not really - I'm not sure if its good practice or not, some targets seem to do this but x86 not so much.
> There's a vague desire to be able to omit the target intrinsics if the target isn't built, which would imply eventually making the clang parts conditionally compiled
I'm blanking on this (loooooong week) - but isn't there a way to tell the driver to treat this as a c program? Then we can either add run lines that test it as 'c' in the (renamed) cpp file or 'c++11' in the original c file - I don't mind which.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86229/new/

https://reviews.llvm.org/D86229



More information about the cfe-commits mailing list