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:
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
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:
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
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
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
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
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;
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;
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?
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;
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
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;
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;
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
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
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/
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:
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:
>
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:
>
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:
>
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
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
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
hjl.tools added inline comments.
Comment at: llvm/lib/Target/X86/X86.td:84
"Enable SSE 4.2 instructions",
- [FeatureSSE41]>;
+ [FeatureSSE41, FeatureCRC32]>;
// The
craig.topper added inline comments.
Comment at: llvm/lib/Target/X86/X86.td:84
"Enable SSE 4.2 instructions",
- [FeatureSSE41]>;
+ [FeatureSSE41, FeatureCRC32]>;
//
hjl.tools added inline comments.
Comment at: llvm/lib/Target/X86/X86.td:84
"Enable SSE 4.2 instructions",
- [FeatureSSE41]>;
+ [FeatureSSE41, FeatureCRC32]>;
// The
craig.topper added inline comments.
Comment at: llvm/lib/Target/X86/X86.td:84
"Enable SSE 4.2 instructions",
- [FeatureSSE41]>;
+ [FeatureSSE41, FeatureCRC32]>;
//
tianqing added inline comments.
Comment at: llvm/lib/Target/X86/X86.td:84
"Enable SSE 4.2 instructions",
- [FeatureSSE41]>;
+ [FeatureSSE41, FeatureCRC32]>;
// The
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
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
31 matches
Mail list logo