[PATCH] D112143: [X86][ABI] Do not return float/double from x87 registers when x87 is disabled

2021-10-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 381179. pengfei added a comment. Fix bugs. Ready for review now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112143/new/ https://reviews.llvm.org/D112143 Files: clang/include/clang/Driver/Options.td

[PATCH] D112143: [X86][ABI] Do not return float/double from x87 registers when x87 is disabled

2021-10-20 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei planned changes to this revision. pengfei added a comment. Found a mistake, working on that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112143/new/ https://reviews.llvm.org/D112143 ___

[PATCH] D112143: [X86][ABI] Do not return float/double from x87 registers when x87 is disabled

2021-10-20 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: aturetsk, echristo, RKSimon, LuoYuanke, craig.topper. Herald added subscribers: dang, hiraditya. pengfei requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This is

[PATCH] D111517: [X86] Remove little support we had for MPX

2021-10-11 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. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111517/new/ https://reviews.llvm.org/D111517

[PATCH] D111037: [X86] Check if struct is blank before getting the inner types

2021-10-08 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc0f9c7c01561: [X86] Check if struct is blank before getting the inner types (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D111037: [X86] Check if struct is blank before getting the inner types

2021-10-08 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 378102. pengfei added a comment. Use named struct to check CPP as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111037/new/ https://reviews.llvm.org/D111037 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D111037: [X86] Check if struct is blank before getting the inner types

2021-10-08 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/X86/avx512fp16-abi.c:207 +} pr52011() { + // CHECK-C: define{{.*}} { float, double } @pr52011 +} LuoYuanke wrote: > Why not test CPP as well? CPP doesn't allow unnamed struct defined in the result

[PATCH] D111037: [X86] Check if struct is blank before getting the inner types

2021-10-07 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 378082. pengfei marked an inline comment as done. pengfei added a comment. Add more tests. NFC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111037/new/ https://reviews.llvm.org/D111037 Files:

[PATCH] D111178: Fix clang postMerge logic based on System V ABI Standard

2021-10-05 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Testcase? Can this patch fix the problem in D107965 ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78/new/ https://reviews.llvm.org/D78

[PATCH] D107141: [Inline-asm] Add structure type handling when they are tied in input and output constraints

2021-10-05 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 377168. pengfei added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107141/new/ https://reviews.llvm.org/D107141 Files: clang/lib/CodeGen/CGStmt.cpp clang/lib/Sema/SemaStmtAsm.cpp

[PATCH] D111037: [X86] Check if struct is blank before getting the inner types

2021-10-04 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: dyung, LuoYuanke. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixes pr52011. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D111037 Files:

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-29 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D109607#3030478 , @dyung wrote: > Hi, our internal testing started to hit an assertion failure in one of our > tests after this commit. I have put the details in PR52011, can you please > take a look? Sure. Thanks for

[PATCH] D110336: [X86][FP16] Add more builtins to avoid multi evaluation problems & add 2 missed intrinsics

2021-09-26 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7d6889964ab5: [X86][FP16] Add more builtins to avoid multi evaluation problems add 2 missed… (authored by pengfei). Changed prior to commit:

[PATCH] D110336: [X86][FP16] Add more builtins to avoid multi evaluation problems & add 2 missed intrinsics

2021-09-23 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 374704. pengfei added a comment. Move mask to the second to last operand. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110336/new/ https://reviews.llvm.org/D110336 Files:

[PATCH] D110336: [X86][FP16] Add more builtins to avoid multi evaluation problems & add 2 missed intrinsics

2021-09-23 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/include/clang/Basic/BuiltinsX86.def:2021 TARGET_BUILTIN(__builtin_ia32_vfmaddcph256_maskz, "V8fV8fV8fV8fUc", "ncV:256:", "avx512fp16,avx512vl") -TARGET_BUILTIN(__builtin_ia32_vfmaddcph512_mask, "V16fV16fV16fV16fUsIi",

[PATCH] D110336: [X86][FP16] Add more builtins to avoid multi evaluation problems & add 2 missed intrinsics

2021-09-23 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: LuoYuanke, craig.topper, RKSimon, yubing. pengfei requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

2021-09-22 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGebec077e07f5: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow… (authored by pengfei). Repository: rG LLVM Github

[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

2021-09-22 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks Craig! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109658/new/ https://reviews.llvm.org/D109658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

2021-09-22 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. By the way, we synced with GCC and we are using the same order in the builtins now. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=db3b96df03fdbe2fb770729501e2e9b65e66c2da;hp=ed643e9f171e99b0aa1453b3f29ed1103e9b5c80 We still have some different builtin names due to

[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

2021-09-22 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avx512fp16intrin.h:2972 #define _mm_mask_fcmadd_round_sch(A, U, B, C, R) \ ((__m128h)__builtin_ia32_selectps_128( \ (__mmask8)(U & 1),

[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

2021-09-22 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avx512fp16intrin.h:2972 #define _mm_mask_fcmadd_round_sch(A, U, B, C, R) \ ((__m128h)__builtin_ia32_selectps_128( \ (__mmask8)(U & 1),

[PATCH] D110037: [X86] Always check the size of SourceTy before getting the next type

2021-09-20 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG227673398c2d: [X86] Always check the size of SourceTy before getting the next type (authored by pengfei). Repository: rG LLVM Github Monorepo

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-20 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D109607#3009412 , @Meinersbur wrote: > In D109607#3009377 , @pengfei wrote: > >> In D109607#3008486 , @Meinersbur >> wrote: >> >>> However,

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-20 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D109607#3008486 , @Meinersbur wrote: > However, my other one that is connected to lab.llvm.org has failed as well > and should have sent an email: > https://lab.llvm.org/buildbot/#/builders/102/builds/2722. Unfortunately it

[PATCH] D110037: [X86] Always check the size of SourceTy before getting the next type

2021-09-20 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/X86/va-arg-sse.c:2 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // RUN: %clang_cc1 %s -O2 -emit-llvm -o - -triple x86_64-unknown-unknown | FileCheck %s Meinersbur

[PATCH] D110037: [X86] Always check the size of SourceTy before getting the next type

2021-09-20 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 373581. pengfei marked 2 inline comments as done. pengfei added a comment. Address review comments. Thanks Roman and Michael. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110037/new/

[PATCH] D110037: [X86] Always check the size of SourceTy before getting the next type

2021-09-19 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. I'm wondering whether the test case is required or not for this patch. Reasons: 1. We have a test in llvm-test-suite can cover this and the test is just a snippet of it; 2. The test case can not reflect the direct effect of this change; 3. There're many variables in IR

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-19 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D109607#3007860 , @Meinersbur wrote: > This patch seem to have broken `GCC-C-execute-pr44575` from the > llvm-test-suite. See http://meinersbur.de:8011/#/builders/76/builds/761 (this > builder compiles with Polly, but it

[PATCH] D110037: [X86] Always check the size of SourceTy before getting the next type

2021-09-19 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: LuoYuanke, Meinersbur, craig.topper, RKSimon. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. D109607 results in a regression in

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-18 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D109607#3007860 , @Meinersbur wrote: > This patch seem to have broken `GCC-C-execute-pr44575` from the > llvm-test-suite. See http://meinersbur.de:8011/#/builders/76/builds/761 (this > builder compiles with Polly, but it

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-16 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe9e1d4751b54: [X86] Refactor GetSSETypeAtOffset to fix pr51813 (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109607/new/

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-15 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 372664. pengfei marked 2 inline comments as done. pengfei added a comment. Address Yuanke's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109607/new/ https://reviews.llvm.org/D109607 Files:

[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

2021-09-14 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Forgot to say thanks @craig.topper and @RKSimon for the information. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109658/new/ https://reviews.llvm.org/D109658 ___ cfe-commits

[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

2021-09-14 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. > Do we have any builtins with the same name as gcc but different > operands/behaviours? Those are the only ones that I'd be worried about. I think it's rare in existing intrinsics. 1) The builtins are always straightforward passed the arguments in intrinsics in the

[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

2021-09-13 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 372400. pengfei added a comment. Allow MI operands of complex FMA to be commutable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109658/new/ https://reviews.llvm.org/D109658 Files:

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-13 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:3454 - -return llvm::Type::getHalfTy(getVMContext()); - } LuoYuanke wrote: > Is this the major change? No, this logic is not changed. When `T1` is nullptr, it means `IRType` is

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-13 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 372254. pengfei marked an inline comment as done. pengfei added a comment. Add more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109607/new/ https://reviews.llvm.org/D109607 Files:

[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

2021-09-13 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D109658#2996767 , @craig.topper wrote: > In D109658#2996714 , @pengfei wrote: > >> In D109658#2996412 , @craig.topper >> wrote: >> >>> Does

[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

2021-09-12 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D109658#2996412 , @craig.topper wrote: > Does gcc use the same builtin name? Our general policy is to have the same > interface as gcc if we have a builtin. So if gcc has these builtins the > should work the same way. No.

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-12 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 372123. pengfei added a comment. Ues `getTypeAllocSize`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109607/new/ https://reviews.llvm.org/D109607 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-12 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 372122. pengfei added a comment. Fix format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109607/new/ https://reviews.llvm.org/D109607 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-12 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 372120. pengfei added a comment. Change to use `getFPTypeAtOffset`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109607/new/ https://reviews.llvm.org/D109607 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D109607: [X86] Refactor GetSSETypeAtOffset to fix pr51813

2021-09-12 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 372119. pengfei added a comment. Fix typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109607/new/ https://reviews.llvm.org/D109607 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D109607: [X86][WIP] Refactor GetSSETypeAtOffset

2021-09-12 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 372118. pengfei added a comment. Fix lit fails. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109607/new/ https://reviews.llvm.org/D109607 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

2021-09-12 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: LuoYuanke, craig.topper, RKSimon, yubing. Herald added a subscriber: hiraditya. pengfei requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github

[PATCH] D109487: [X86] Support *_set1_pch(Float16 _Complex h)

2021-09-11 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2aaa6466fe00: [X86] Support *_set1_pch(Float16 _Complex h) (authored by pengfei). Changed prior to commit:

[PATCH] D109607: [X86][WIP] Refactor GetSSETypeAtOffset

2021-09-10 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D109607 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D109487: [X86] Support *_set1_pch(Float16 _Complex h)

2021-09-09 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: LuoYuanke, FreddyYe, craig.topper, RKSimon. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D109487 Files:

[PATCH] D109265: [X86][mingw] Modify the alignment of __m128/__m256/__m512 vector type for mingw

2021-09-06 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe6e8d25920c1: [X86][mingw] Modify the alignment of __m128/__m256/__m512 vector type for mingw (authored by pengfei). Repository: rG LLVM Github

[PATCH] D109265: [X86][mingw] Modify the alignment of __m128/__m256/__m512 vector type for mingw

2021-09-06 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks Martin! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109265/new/ https://reviews.llvm.org/D109265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D109265: [X86][mingw] Modify the alignment of __m128/__m256/__m512 vector type for mingw

2021-09-03 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: rnk, mstorsjo, LiuChen3, LuoYuanke. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is a follow up patch after D78564 and D108887

[PATCH] D105269: [X86] AVX512FP16 instructions enabling 6/6

2021-08-31 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3902 + case X86::VFCMADDCSHZr: + case X86::VFCMADDCSHZrb: + case X86::VFCMADDCSHZrbk: pengfei wrote: > LuoYuanke wrote: > > "b" means rounding. Right? > broadcasting

[PATCH] D105269: [X86] AVX512FP16 instructions enabling 6/6

2021-08-27 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:47419 + : X86ISD::VFCMADDC; + // FIXME: How we handle when FMF of FADD is different from CFMUL's? + CFmul = DAG.getNode(newOp, SDLoc(N),

[PATCH] D105269: [X86] AVX512FP16 instructions enabling 6/6

2021-08-27 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks for the review. Comment at: clang/test/CodeGen/X86/avx512fp16-builtins.c:4223 + +// CFC ADD PH + LuoYuanke wrote: > MADD? They are marks used when adding tests. We can remove them now. Repository: rG LLVM Github Monorepo

[PATCH] D105269: [X86] AVX512FP16 instructions enabling 6/6

2021-08-26 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86InstrFoldTables.cpp:1852 + { X86::VFCMULCPHZrr, X86::VFCMULCPHZrm, 0 }, + { X86::VFCMULCSHZrr, X86::VFCMULCSHZrm, TB_NO_REVERSE }, { X86::VFMADDPD4Yrr,

[PATCH] D105269: [X86] AVX512FP16 instructions enabling 6/6

2021-08-26 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3902 + case X86::VFCMADDCSHZr: + case X86::VFCMADDCSHZrb: + case X86::VFCMADDCSHZrbk: LuoYuanke wrote: > "b" means rounding. Right? broadcasting

[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 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 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 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] D108609: [clang] NFC: remove superfluous braces

2021-08-24 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1f8602e16eac: [clang] NFC: remove superfluous braces (authored by zhouyizhou, committed by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D105268: [X86] AVX512FP16 instructions enabling 5/6

2021-08-23 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc728bd5bbaab: [X86] AVX512FP16 instructions enabling 5/6 (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D108509: [X86][AMX] Add missing inline attributes in AMX intrinsics. NFCI

2021-08-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei abandoned this revision. pengfei added a comment. Didn't notice Craig fixed it. Thanks Craig. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108509/new/ https://reviews.llvm.org/D108509 ___

[PATCH] D105268: [X86] AVX512FP16 instructions enabling 5/6

2021-08-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/include/clang/Basic/BuiltinsX86.def:2010 +TARGET_BUILTIN(__builtin_ia32_vfmaddph, "V8xV8xV8xV8x", "ncV:128:", "avx512fp16,avx512vl") +TARGET_BUILTIN(__builtin_ia32_vfmaddph256, "V16xV16xV16xV16x", "ncV:256:",

[PATCH] D105268: [X86] AVX512FP16 instructions enabling 5/6

2021-08-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 367957. pengfei marked 8 inline comments as done. pengfei added a comment. Address Yuanke's comments. Thanks Yuanke and Craig. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105268/new/

[PATCH] D108509: [X86][AMX] Add missing inline attributes in AMX intrinsics. NFCI

2021-08-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: LuoYuanke, yubing, craig.topper. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This should fix unused warning reported in

[PATCH] D105265: [X86] AVX512FP16 instructions enabling 3/6

2021-08-19 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D105265#2955329 , @vitalybuka wrote: > I suspect this error from this or D105331 > https://lab.llvm.org/buildbot/#/builders/85/builds/6132 Thanks @vitalybuka for the information. I didn't

[PATCH] D105267: [X86] AVX512FP16 instructions enabling 4/6

2021-08-19 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks Yuanke and Craig. Comment at: llvm/lib/Target/X86/X86InstrAVX512.td:9279 /// avx512_fp14_s rcp14ss, rcp14sd, rsqrt14ss, rsqrt14sd multiclass avx512_fp14_s opc, string OpcodeStr, SDNode OpNode, + X86FoldableSchedWrite

[PATCH] D105267: [X86] AVX512FP16 instructions enabling 4/6

2021-08-18 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/include/clang/Basic/BuiltinsX86.def:1897 + +TARGET_BUILTIN(__builtin_ia32_rndscaleph_128_mask, "V8xV8xIiV8xUc", "ncV:128:", "avx512fp16,avx512vl") +TARGET_BUILTIN(__builtin_ia32_rndscaleph_256_mask, "V16xV16xIiV16xUs",

[PATCH] D105331: [CFE][X86] Enable complex _Float16 support

2021-08-17 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5aeca3b0a595: [CFE][X86] Enable complex _Float16 support (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105331/new/

[PATCH] D105265: [X86] AVX512FP16 instructions enabling 3/6

2021-08-17 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2379949aadce: [X86] AVX512FP16 instructions enabling 3/6 (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D105268: [X86] AVX512FP16 instructions enabling 5/6

2021-08-17 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avx512fp16intrin.h:2373 + (__v32hf)(__m512h)(A), (__v32hf)(__m512h)(B), (__v32hf)(__m512h)(C), \ + (__mmask32)-1, (int)(R)) + RKSimon wrote: > Add outer brackets to all the defines to

[PATCH] D105268: [X86] AVX512FP16 instructions enabling 5/6

2021-08-17 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 366873. pengfei added a comment. Rebased. Add extra parentheses for macro. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105268/new/ https://reviews.llvm.org/D105268 Files:

[PATCH] D105265: [X86] AVX512FP16 instructions enabling 3/6

2021-08-16 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:1996 setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v16f16, Custom); + setOperationAction(ISD::SINT_TO_FP, MVT::v16i16, Legal); +

[PATCH] D105265: [X86] AVX512FP16 instructions enabling 3/6

2021-08-16 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:1996 setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v16f16, Custom); + setOperationAction(ISD::SINT_TO_FP, MVT::v16i16, Legal); +

[PATCH] D105265: [X86] AVX512FP16 instructions enabling 3/6

2021-08-16 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 366630. pengfei added a comment. 1. Address Yuanke's comments. 2. Add missed strict FP handling. 3. Refactor the repeated declarations for strict FP. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105265/new/

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-15 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks Craig! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105264/new/ https://reviews.llvm.org/D105264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D105265: [X86] AVX512FP16 instructions enabling 3/6

2021-08-14 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 366470. pengfei marked an inline comment as done. pengfei added a comment. Rebased. Add extra parentheses for macro. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105265/new/ https://reviews.llvm.org/D105265

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-14 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf1de9d6dae17: [X86] AVX512FP16 instructions enabling 2/6 (authored by pengfei). Changed prior to commit:

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-13 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks for the review! Comment at: clang/lib/Headers/avx512vlfp16intrin.h:368 +_mm256_reduce_add_ph(__m256h __W) { + return __builtin_ia32_reduce_fadd_ph256(0.0f16, __W); +} LuoYuanke wrote: > From

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-13 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 366194. pengfei added a comment. Address Yuanke's comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105264/new/ https://reviews.llvm.org/D105264 Files: clang/include/clang/Basic/BuiltinsX86.def

[PATCH] D105265: [X86] AVX512FP16 instructions enabling 3/6

2021-08-12 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avx512fp16intrin.h:1748 + +#define _mm_cvt_roundsh_i32(A, R) \ + (int)__builtin_ia32_vcvtsh2si32((__v8hf)(A), (int)(R)) LuoYuanke wrote: > Does it also

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-12 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86InstrFoldTables.cpp:4838 { X86::VMULSDZrr_Intk,X86::VMULSDZrm_Intk, TB_NO_REVERSE }, + { X86::VMULSHZrr_Intk,X86::VMULSHZrm_Intk, TB_NO_REVERSE }, {

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-12 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 365995. pengfei marked an inline comment as done. pengfei added a comment. Address Yuanke's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105264/new/ https://reviews.llvm.org/D105264 Files:

[PATCH] D107946: [X86] Reverse *_set_ph and *_setr_ph 's set order.

2021-08-12 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. LGTM. Thanks Freddy. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107946/new/ https://reviews.llvm.org/D107946

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-11 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 365899. pengfei added a comment. Update missing changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105264/new/ https://reviews.llvm.org/D105264 Files: clang/include/clang/Basic/BuiltinsX86.def

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-11 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3197 + else if (PatchedName.endswith("sh")) +PatchedName = IsVCMP ? "vcmpsh" : "cmpsh"; + else if (PatchedName.endswith("ph")) LuoYuanke wrote: > There is

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-11 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 365895. pengfei marked 3 inline comments as done. pengfei added a comment. Address Yuanke's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105264/new/ https://reviews.llvm.org/D105264 Files:

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-11 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks for the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105264/new/ https://reviews.llvm.org/D105264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-11 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/include/clang/Basic/BuiltinsX86.def:1860 +TARGET_BUILTIN(__builtin_ia32_minph512, "V32xV32xV32xIi", "ncV:512:", "avx512fp16") + +TARGET_BUILTIN(__builtin_ia32_minph256, "V16xV16xV16x", "ncV:256:",

[PATCH] D105264: [X86] AVX512FP16 instructions enabling 2/6

2021-08-11 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 365738. pengfei marked 6 inline comments as done. pengfei added a comment. 1. Rebase to the first merged FP16 patch. 2. Address Yuanke's comments. 3. Add parentheses around casts. 4. Remove OptForSize predicate for vmovsh. 5. Add more immediate value for

[PATCH] D105263: [X86] AVX512FP16 instructions enabling 1/6

2021-08-11 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86InstrAVX512.td:4159 +defm VMOVSHZ : avx512_move_scalar<"vmovsh", X86Movsh, X86vzload16, f16x_info, + [HasFP16]>, + VEX_LIG, T_MAP5XS, EVEX_CD8<16,

[PATCH] D107843: [X86] Add parentheses around casts in some of the X86 intrinsic headers.

2021-08-10 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. Thanks Craig. I haven't find time to work on it. I think this is a good start. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D105331: [CFE][X86] Enable complex _Float16.

2021-08-09 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 365360. pengfei added a comment. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105331/new/ https://reviews.llvm.org/D105331 Files: clang/lib/CodeGen/TargetInfo.cpp clang/lib/Sema/DeclSpec.cpp

[PATCH] D105331: [CFE][X86] Enable complex _Float16.

2021-08-09 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D105331#2933893 , @LuoYuanke wrote: > Would you check the failure of the test cases? They failed due to they are built based on the ToT instead of the 1st patch of FP16. Repository: rG LLVM Github Monorepo CHANGES SINCE

[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] D105263: [X86] AVX512FP16 instructions enabling 1/6

2021-08-08 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:3471 + ContainsFloatAtOffset(IRType, IROffset + 4, getDataLayout())) +return llvm::FixedVectorType::get(llvm::Type::getHalfTy(getVMContext()), 4); + LuoYuanke wrote: > For 2

[PATCH] D105263: [X86] AVX512FP16 instructions enabling 1/6

2021-08-06 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86InstrAVX512.td:4478 + let Predicates = [HasFP16] in { +def VMOVSHZrr_REV: AVX512<0x11, MRMDestReg, (outs VR128X:$dst), +(ins VR128X:$src1, VR128X:$src2), craig.topper wrote: > pengfei

[PATCH] D105263: [X86] AVX512FP16 instructions enabling 1/6

2021-08-06 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei marked 7 inline comments as done. pengfei added a comment. Thanks Yuanke. Comment at: clang/lib/Headers/avx512fp16intrin.h:292 + + return (__m128h)__builtin_ia32_loadsh128_mask((__v8hf *)__A, src, __U & 1); +} LuoYuanke wrote: > Just be curious, why

[PATCH] D107141: [Inline-asm] Add structure type handling when they are tied in input and output constraints

2021-08-04 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 363974. pengfei added a comment. Address Jennifer comments from off-line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107141/new/ https://reviews.llvm.org/D107141 Files: clang/lib/CodeGen/CGStmt.cpp

  1   2   3   >