[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r364352 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Yeah LAHF/SAHF just improves codegen. Lack of it won't result in any library calls. This patch LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 ___

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @craig.topper, hmm, what happens in terms of CG when LAHF/SAHF are not available? I assume its just worse CG as you could spill AH onto the stack and do a load/store. This actually results in library calls which may not be possible to fulfill. Repository: rC Clan

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 206519. compnerd added a comment. Move test case around Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 Files: lib/Driver/ToolChains/Arch/X86.cpp test/Driver/clang-translation.c

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Another odd feature that's missing from early x86-64 CPUs is sahf. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 ___ cfe-commits mailing list c

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 206508. compnerd added a comment. add additional context and test case Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 Files: lib/Driver/ToolChains/Arch/X86.cpp test/Driver/andro

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: test/Driver/android-default-x86_64.c:1 +// RUN: %clang -### -target x86_64-unknown-linux-android -c %s 2>&1 | FileCheck %s +// CHECK: "-mcx16" should we just update the android 64 case in clang-translation.c instea

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @lebedev.ri - sure, I will add a driver test to ensure that the feature is set on the command line when invoked from the driver, however, I don't think that there is really much in terms of testing that you can do for this type of stuff other than throw a large corpus

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Stephen Hines via Phabricator via cfe-commits
srhines accepted this revision. srhines added a comment. This revision is now accepted and ready to land. Craig, can you confirm that this is acceptable? I don't think there are any chips with SSE4.2 but without cx16, so this just seemed like an oversight. It might be a good idea to really audit

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Is there some test for this area of code? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63774/new/ https://reviews.llvm.org/D63774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D63774: android: enable double-word CAS on x86_64

2019-06-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added reviewers: craig.topper, srhines. Herald added a subscriber: jfb. Herald added a project: clang. The android target assumes that for the x86_64 target, the CPU supports SSE4.2 and `popcnt`. This implies that the CPU is Nehalem or newer. This should