[PATCH] D105462: [X86] Add CRC32 feature.

2021-09-06 Thread Wang Tianqing via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. tianqing marked an inline comment as done. Closed by commit rG12fa608af44a: [X86] Add CRC32 feature. (authored by tianqing). Changed prior to commit:

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing marked an inline comment as done. tianqing added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:160 + // enabled. + I = Features.find("sse4.2"); + if (I != Features.end() && I->getValue() && craig.topper wrote: > I guess I don't

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing updated this revision to Diff 368795. tianqing marked an inline comment as done. tianqing added a comment. Use existing code in X86.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105462/new/ https://reviews.llvm.org/D105462 Files:

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:160 + // enabled. + I = Features.find("sse4.2"); + if (I != Features.end() && I->getValue() && I guess I don't understand why this is coded differently than mmx, popcnt, and

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing marked an inline comment as done. tianqing added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:158 + // Enable CRC32 if SSE4.2 is enabled and CRC32 is not explicitly set. + I = Features.find("sse4.2"); craig.topper wrote: > Why

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing updated this revision to Diff 368793. tianqing added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105462/new/ https://reviews.llvm.org/D105462 Files: clang/docs/ClangCommandLineReference.rst

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. This revision is now accepted and ready to land. Then I'm OK with this change. Comment at: llvm/lib/Support/X86TargetParser.cpp:531 constexpr FeatureBitset ImpliedFeaturesSSSE3 = FeatureSSE3; constexpr FeatureBitset

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/X86TargetParser.cpp:531 constexpr FeatureBitset ImpliedFeaturesSSSE3 = FeatureSSE3; constexpr FeatureBitset ImpliedFeaturesSSE4_1 = FeatureSSSE3; constexpr FeatureBitset ImpliedFeaturesSSE4_2 = FeatureSSE4_1;

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Support/X86TargetParser.cpp:531 constexpr FeatureBitset ImpliedFeaturesSSSE3 = FeatureSSE3; constexpr FeatureBitset ImpliedFeaturesSSE4_1 = FeatureSSSE3; constexpr FeatureBitset ImpliedFeaturesSSE4_2 = FeatureSSE4_1;

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:158 + // Enable CRC32 if SSE4.2 is enabled and CRC32 is not explicitly set. + I = Features.find("sse4.2"); Why doesn't this say "not explicitly disabled" like the others above?

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing added inline comments. Comment at: llvm/lib/Support/X86TargetParser.cpp:531 constexpr FeatureBitset ImpliedFeaturesSSSE3 = FeatureSSE3; constexpr FeatureBitset ImpliedFeaturesSSE4_1 = FeatureSSSE3; constexpr FeatureBitset ImpliedFeaturesSSE4_2 = FeatureSSE4_1;

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:159 + // Enable CRC32 if SSE4.2 is enabled. + // NOTE: In conformance with GCC behavior, CRC32 is still available even if + // it's explicitly disabled. pengfei wrote: > hjl.tools

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Support/X86TargetParser.cpp:531 constexpr FeatureBitset ImpliedFeaturesSSSE3 = FeatureSSE3; constexpr FeatureBitset ImpliedFeaturesSSE4_1 = FeatureSSSE3; constexpr FeatureBitset ImpliedFeaturesSSE4_2 = FeatureSSE4_1;

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added inline comments. Comment at: llvm/lib/Support/X86TargetParser.cpp:531 constexpr FeatureBitset ImpliedFeaturesSSSE3 = FeatureSSE3; constexpr FeatureBitset ImpliedFeaturesSSE4_1 = FeatureSSSE3; constexpr FeatureBitset ImpliedFeaturesSSE4_2 = FeatureSSE4_1;

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:159 + // Enable CRC32 if SSE4.2 is enabled. + // NOTE: In conformance with GCC behavior, CRC32 is still available even if + // it's explicitly disabled. hjl.tools wrote: > craig.topper

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing marked 2 inline comments as done. tianqing added inline comments. Comment at: clang/lib/Headers/crc32intrin.h:31 +static __inline__ unsigned int __DEFAULT_FN_ATTRS +_mm_crc32_u8(unsigned int __C, unsigned char __D) +{ pengfei wrote: > ditto. Not sure

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-25 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing updated this revision to Diff 368589. tianqing added a comment. - Update behavior of -msse4.2 option. - Add test for -msse4.2 and -mno-crc32. - Fix some format error. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105462/new/

[PATCH] D105462: [X86] Add CRC32 feature.

2021-08-09 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/crc32intrin.h:13 + +#define __DEFAULT_FN_ATTRS \ + __attribute__((__always_inline__, __nodebug__, __target__("crc32"))) Better to follow Lint's suggestions. Comment at:

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-21 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:159 + // Enable CRC32 if SSE4.2 is enabled. + // NOTE: In conformance with GCC behavior, CRC32 is still available even if + // it's explicitly disabled. craig.topper wrote: >

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:159 + // Enable CRC32 if SSE4.2 is enabled. + // NOTE: In conformance with GCC behavior, CRC32 is still available even if + // it's explicitly disabled. hjl.tools wrote: >

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-21 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:159 + // Enable CRC32 if SSE4.2 is enabled. + // NOTE: In conformance with GCC behavior, CRC32 is still available even if + // it's explicitly disabled. tianqing wrote: >

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-21 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:159 + // Enable CRC32 if SSE4.2 is enabled. + // NOTE: In conformance with GCC behavior, CRC32 is still available even if + // it's explicitly disabled. craig.topper wrote: > This

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-20 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:159 + // Enable CRC32 if SSE4.2 is enabled. + // NOTE: In conformance with GCC behavior, CRC32 is still available even if + // it's explicitly disabled. This doesn't seem to be

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-20 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing updated this revision to Diff 360338. tianqing added a comment. Herald added a subscriber: jfb. Instead of using ImpliedFeatures, manually enable CRC32 in presence of SSE4.2. This should mimic GCC better. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-06 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added inline comments. Comment at: llvm/lib/Target/X86/X86.td:84 "Enable SSE 4.2 instructions", - [FeatureSSE41]>; + [FeatureSSE41, FeatureCRC32]>; // The

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/X86/X86.td:84 "Enable SSE 4.2 instructions", - [FeatureSSE41]>; + [FeatureSSE41, FeatureCRC32]>; //

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-06 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added inline comments. Comment at: llvm/lib/Target/X86/X86.td:84 "Enable SSE 4.2 instructions", - [FeatureSSE41]>; + [FeatureSSE41, FeatureCRC32]>; // The

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/X86/X86.td:84 "Enable SSE 4.2 instructions", - [FeatureSSE41]>; + [FeatureSSE41, FeatureCRC32]>; //

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-06 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing added inline comments. Comment at: llvm/lib/Target/X86/X86.td:84 "Enable SSE 4.2 instructions", - [FeatureSSE41]>; + [FeatureSSE41, FeatureCRC32]>; // The

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Support/X86TargetParser.cpp:531 constexpr FeatureBitset ImpliedFeaturesSSE4_1 = FeatureSSSE3; -constexpr FeatureBitset ImpliedFeaturesSSE4_2 = FeatureSSE4_1; +constexpr FeatureBitset ImpliedFeaturesSSE4_2 = FeatureSSE4_1

[PATCH] D105462: [X86] Add CRC32 feature.

2021-07-06 Thread Wang Tianqing via Phabricator via cfe-commits
tianqing created this revision. Herald added subscribers: dexonsmith, dang, pengfei, hiraditya, mgorny. tianqing requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. d8faf03807ac