[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-05-30 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei reopened this revision. pengfei added a comment. This revision is now accepted and ready to land. Reverted by https://reviews.llvm.org/rL362186 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.llvm.org/D60748 ___

[PATCH] D62367: [X86] VP2INTERSECT clang

2019-05-30 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362196: [X86] Add VP2INTERSECT instructions (authored by pengfei, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org

[PATCH] D62282: [X86] Add ENQCMD intrinsics.

2019-06-06 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362685: [X86] Add ENQCMD instructions (authored by pengfei, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D6228

[PATCH] D62835: [X86] -march=cooperlake (clang)

2019-06-07 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362781: [X86] -march=cooperlake (clang) (authored by pengfei, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D62

[PATCH] D62363: [X86] Enable intrinsics that convert float and bf16 data to each other

2019-06-10 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363018: [X86] Enable intrinsics that convert float and bf16 data to each other (authored by pengfei, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-11 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363116: [X86] [ABI] Fix i386 ABI "__m64" type bug (authored by pengfei, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.ll

[PATCH] D64389: [NFC] [X86] Fix scan-build complaining

2019-07-09 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: RKSimon, xiangzhangllvm, craig.topper. Herald added a project: clang. Herald added a subscriber: cfe-commits. Remove unused variable. This fixes bug: https://bugs.llvm.org/show_bug.cgi?id=42526 Signed-off-by: pengfei Repository: rG LLVM

[PATCH] D64389: [NFC] [X86] Fix scan-build complaining

2019-07-09 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365473: [NFC] [X86] Fix scan-build complaining (authored by pengfei, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.

[PATCH] D60748: Fix i386 struct and union parameter alignment

2019-05-29 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC361934: [X86] Fix i386 struct and union parameter alignment (authored by pengfei, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60748/new/ https://reviews.

[PATCH] D56391: Limit COFF 'common' emission to <=32 alignment types.

2019-01-08 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 Erich. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56391/new/ https://reviews.llvm.org/D56391 ___ cfe-commits mailing l

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2020-07-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: zequanwu, rnk, asbirlea. Herald added a project: clang. Herald added a subscriber: cfe-commits. Sometimes we also want to avoid merging inline assembly. This patch add the nomerge function attribute to inline assembly. Repository: rG LLVM

[PATCH] D84225: [CFE] Add nomerge function attribute to inline assembly.

2020-07-21 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG18581fd2c441: [CFE] Add nomerge function attribute to inline assembly. (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84225/new/ https

[PATCH] D85385: [X86][FPEnv] Teach X86 mask compare intrinsics to respect strict FP semantics.

2020-08-10 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85385/new/ https://reviews.llvm.org/D85385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D85385: [X86][FPEnv] Teach X86 mask compare intrinsics to respect strict FP semantics.

2020-08-10 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/avx512f-builtins-constrained-cmp.c:793 // CHECK-LABEL: test_mm512_mask_cmp_pd_mask_true_us - // CHECK: [[CMP:%.*]] = call <8 x i1> @llvm.x86.avx512.cmp.pd.512(<8 x double> %{{.*}}, <8 x double> %{{.*}}, i32 31, i3

[PATCH] D106210: [MS] Preserve base register %esi around movs[bwl]

2021-07-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 rG91bc85b1ebaa: [MS] Preserve base register %esi around movs[bwl] (authored by namazso, committed by pengfei). Repository: rG LLVM Github Monorepo

[PATCH] D106210: [MS] Preserve base register %esi around movs[bwl]

2021-07-23 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Happened to see it. I thought Craig might miss it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106210/new/ https://reviews.llvm.org/D106210 ___ cfe-commits mailing list cfe-com

[PATCH] D106790: prfchwintrin.h: Make _m_prefetchw take a pointer to volatile (PR49124)

2021-07-26 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/prfchwintrin.h:54 +#pragma clang diagnostic ignored "-Wcast-qual" + __builtin_prefetch ((const void*)__P, 1, 3 /* _MM_HINT_T0 */); +#pragma clang diagnostic pop Can we declare `__builtin_prefetch` to v

[PATCH] D106849: [NFC][X86] add missing tests in clang/test/CodeGen/attr-target-mv.c

2021-07-26 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/D106849/new/ https://reviews.llvm.org/D106849

[PATCH] D107082: [X86][RFC] Enable `_Float16` type support on X86 following the psABI

2021-07-29 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. I sent out this patch mainly for PoC of the ABI changes, I'll fix the performance regressions in next phase. LLVM was using a different calling conversion on x86 when passing and returning half type. It conflicts with current X86 psABI. I have evaluated the risk internal

[PATCH] D107082: [X86][RFC] Enable `_Float16` type support on X86 following the psABI

2021-07-29 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/include/llvm/IR/RuntimeLibcalls.def:293-294 HANDLE_LIBCALL(FPEXT_F16_F64, "__extendhfdf2") HANDLE_LIBCALL(FPEXT_F16_F32, "__gnu_h2f_ieee") HANDLE_LIBCALL(FPROUND_F32_F16, "__gnu_f2h_ieee") HANDLE_LIBCALL(FPROUND_F64_F16, "__trun

[PATCH] D107082: [X86][RFC] Enable `_Float16` type support on X86 following the psABI

2021-07-29 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D107082#2913881 , @craig.topper wrote: > I haven't had a chance to look at this patch in detail, but I wanted to ask > if you considered doing what ARM and RISCV do for this. They pass the f16 in > the lower bits on an f32 b

[PATCH] D72820: Add pragma FP_CONTRACT support.

2020-01-15 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: craig.topper, andrew.w.kaylor, uweigand, RKSimon, LiuChen3. Herald added subscribers: llvm-commits, cfe-commits, jdoerfert, hiraditya. Herald added projects: clang, LLVM. Support pragma FP_CONTRACT. Repository: rG LLVM Github Monorepo h

[PATCH] D72820: Add pragma FP_CONTRACT support.

2020-01-15 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 238408. pengfei added a comment. Remove dead code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72820/new/ https://reviews.llvm.org/D72820 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/test/CodeGen/cons

[PATCH] D72820: Add pragma FP_CONTRACT support.

2020-01-15 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 238414. pengfei marked an inline comment as done. pengfei added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72820/new/ https://reviews.llvm.org/D72820 Files: clang/lib/C

[PATCH] D72824: [X86] Add combination for fma and fneg on X86 under strict FP.

2020-01-15 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: craig.topper, andrew.w.kaylor, uweigand, RKSimon, LiuChen3. pengfei added a project: LLVM. X86 has instructions to calculate fma and fneg at the same time. But we combine the fneg and fma only when fneg is the source operand under strict FP

[PATCH] D72820: Add pragma FP_CONTRACT support.

2020-01-15 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 238417. pengfei marked an inline comment as done. pengfei added a comment. Address review comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72820/new/ https://reviews.llvm.org/D72820 Files: clang/lib/Co

[PATCH] D72824: [X86] Add combination for fma and fneg on X86 under strict FP.

2020-01-16 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 238425. pengfei added a comment. Add FMA4 tests. Thanks @RKSimon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72824/new/ https://reviews.llvm.org/D72824 Files: llvm/lib/Target/X86/X86ISelLowering.cpp llv

[PATCH] D92837: [X86] Support tilezero intrinsic and c interface for AMX.

2020-12-08 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86ExpandPseudo.cpp:499 +MI.RemoveOperand(3); // Remove $tmmcfg +for (int i = 2; i > 0; --i) + MI.RemoveOperand(i); Can change to i = 3? Comment at: llvm/lib/Target/X86

[PATCH] D87981: [X86] AMX programming model.

2020-12-09 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. LGTM. I think we can land this patch as a beginning. Cheers~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87981/new/ https://reviews.llvm.org/D87981

[PATCH] D92940: [X86] Convert fadd/fmul _mm_reduce_* intrinsics to emit llvm.reduction intrinsics (PR47506)

2020-12-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. Thanks for bringing this refactor. I also verified that ICC and GCC both do reduce math in an binary tree way, though sometimes ICC has a different LSB from GCC and Clang. ==

[PATCH] D93179: [X86] Convert fmin/fmax _mm_reduce_* intrinsics to emit llvm.reduction intrinsics (PR47506)

2020-12-14 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Yes, it is using maxpd/minpd here. Sorry for missing the nan cases. In fact, I doubt about the behavior when using fast math with target intrinsics. In my opinion, target intrinsics are always associated with given instructions (reduce* are exceptions). So the behavior o

[PATCH] D93078: [utils] Fix UpdateTestChecks case where 2 runs differ for last label

2020-12-14 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. What's the difference with the existing code? It looks to me that you just brought the warning out of loop, right? Comment at: llvm/utils/update_analyze_test_checks.py:128 raw_tool_output, prefixes, func_dict, func_order, args.verbose, Fals

[PATCH] D93179: [X86] Convert fmin/fmax _mm_reduce_* intrinsics to emit llvm.reduction intrinsics (PR47506)

2020-12-14 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D93179#2452932 , @spatel wrote: > If we're going by existing behavior/compatibility, gcc/icc use packed ops too: > https://godbolt.org/z/9jEhaW > ...so there's an implicit 'nnan nsz' in these intrinsics (and that should be > do

[PATCH] D93078: [utils] Fix UpdateTestChecks case where 2 runs differ for last label

2020-12-14 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. `update_test_prefix.py` assumes the conflicting output. You may need to change the expection of it as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D93078: [utils] Fix UpdateTestChecks case where 2 runs differ for last label

2020-12-15 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/utils/update_analyze_test_checks.py:129 + +common.warn_on_failed_prefixes(func_dict) is_in_function = False mtrofin wrote: > pengfei wrote: > > Can we move these warn to common.py? > Come to think of it

[PATCH] D91927: [X86] Add x86_amx type for intel AMX.

2020-12-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/IR/ConstantFold.cpp:539 + if (V->isNullValue() && !DestTy->isX86_MMXTy() && !DestTy->isX86_AMXTy() + && opc != Instruction::AddrSpaceCast) return Constant::getNullValue(DestTy); Operation should at th

[PATCH] D91927: [X86] Add x86_amx type for intel AMX.

2020-12-22 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:264 + SmallVector DeadInsts; + SmallVector DeadBitcasts; + Maybe better to use BitCastInst? Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:274 + if (

[PATCH] D91927: [X86] Add x86_amx type for intel AMX.

2020-12-23 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. > In my test case, it is transformed after Combine redundant instructions. Can we disable it for AMX type? The pointer to AMX type is meaningless and may result in bad perfomance. Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:300 +// If

[PATCH] D91927: [X86] Add x86_amx type for intel AMX.

2020-12-23 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D91927#2470818 , @LuoYuanke wrote: > In D91927#2469977 , @pengfei wrote: > >>> In my test case, it is transformed after Combine redundant instructions. >> >> Can we disable it for AMX typ

[PATCH] D91927: [X86] Add x86_amx type for intel AMX.

2020-12-23 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:243 +} +// If load has mutli-user, duplicate a amx load. +// %src = load <256 x i32>, <256 x i32>* %addr, align 64 vector Comment at: llv

[PATCH] D91927: [X86] Add x86_amx type for intel AMX.

2020-12-24 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 for the refactors. Maybe better to wait for a few days to see if others have objections. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D87981: [X86] AMX programming model prototype.

2020-11-04 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. You may still need to change the format according to the Lint suggestions. Comment at: clang/lib/Headers/amxintrin.h:227 + +/// This is new intrinsic interface +typedef int _tile_data __attribute__((__vector_size__(1024), __aligned__(64)));

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Craig's method sounds good. @FreddyYe , Why we check AVX512BW instead of AVX512F. I saw SDM says it depends on AVX512F. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90822/new/ https://reviews.llvm.org/D90822

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D90822#2375423 , @pengfei wrote: > Craig's method sounds good. I think it may result in potential problem once we change the order of them in immintrin.h, it should be better to use the first method. #if !(defined(_MSC_VER)

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D90822#2375445 , @craig.topper wrote: > In D90822#2375425 , @pengfei wrote: > >> In D90822#2375423 , @pengfei wrote: >> >>> Craig's method sounds

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-04 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D90822#2375469 , @craig.topper wrote: > In D90822#2375463 , @FreddyYe wrote: > >> In D90822#2375423 , @pengfei wrote: >> >>> Craig's method sound

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-05 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/gfniintrin.h:24 +#ifdef __AVXINTRIN_H +#ifdef __AVX512BWINTRIN_H +#ifdef __AVX512VLINTRIN_H `__AVX512VLBWINTRIN_H` is better. Comment at: clang/lib/Headers/gfniintrin.h:52 U,

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-05 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/gfniintrin.h:104-111 #define _mm512_mask_gf2p8affineinv_epi64_epi8(S, U, A, B, I) \ (__m512i)__builtin_ia32_selectb_512((__mmask64)(U), \ (__v64qi)_mm512_gf2p8affineinv_epi64_ep

[PATCH] D90822: [X86] use macros to split GFNI intrinsics into different kinds

2020-11-05 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90822/new/ https://reviews.llvm.org/D90822 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-11-17 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/AST/Stmt.cpp:795 + SmallVector Pieces; + AsmStr.split(Pieces, "\n\t"); + std::string MSAsmString; Can we always assume the separator is `\n\t`? Comment at: llvm/lib/Target/X86/AsmParser/X8

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-11-17 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. > 2. Delete IsPrefix parameter, and delete 'break', so that we won't check > prefix again. I am not sure if this is right. Att format can allow two prefix > and using the last one as the finally encoding prefix. I think this may not > be the original intention of the de

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-11-17 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. You'd better wait one or two days to see if other people objects. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90441/new/ https

[PATCH] D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1

2020-11-19 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Do we need to consider FP exceptions in _try block? Comment at: clang/include/clang/Driver/Options.td:886 HelpText<"Enable C++ exceptions">, Flags<[CC1Option]>; +def feh_asynch: Flag<["-"], "feh-asynch">, Group, + HelpText<"Enable EH Asynchronous ex

[PATCH] D89102: [X86] Add HRESET instruction.

2020-10-09 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: craig.topper, RKSimon, LuoYuanke. Herald added subscribers: llvm-commits, cfe-commits, dang, hiraditya, mgorny. Herald added projects: clang, LLVM. pengfei requested review of this revision. For more details about these instructions, please r

[PATCH] D89102: [X86] Add HRESET instruction.

2020-10-09 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei marked an inline comment as done. pengfei added a comment. Thanks for the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89102/new/ https://reviews.llvm.org/D89102 ___ cfe-commits mailing

[PATCH] D89102: [X86] Add HRESET instruction.

2020-10-09 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 297234. pengfei added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89102/new/ https://reviews.llvm.org/D89102 Files: clang/docs/ClangCommandLineReference.rst clang/incl

[PATCH] D89102: [X86] Add HRESET instruction.

2020-10-10 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 297402. pengfei added a comment. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89102/new/ https://reviews.llvm.org/D89102 Files: clang/docs/ClangCommandLineReference.rst clang/include/clang/Driver

[PATCH] D89102: [X86] Add HRESET instruction.

2020-10-12 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 rG412cdcf2edf2: [X86] Add HRESET instruction. (authored by pengfei). Changed prior to commit: https://reviews.llvm.org/D89102?vs=297402&id=297732#to

[PATCH] D89184: Support complex target features combinations

2020-10-14 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. > D89105 appears to use only `"avx512vl , > avx512vnni | avxvnni"`. > Does it mean `(avx512vl , avx512vnni) | avxvnni` or `avx512vl , (avx512vnni | > avxvnni)` ? We need to express combination to `(avx512vl , avx512vnni) | avxvnni`, th

[PATCH] D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1

2020-11-22 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D80344#2407305 , @tentzen wrote: > In D80344#2407250 , @pengfei wrote: > >> Do we need to consider FP exceptions in _try block? > > Yes, FP exception is handled as long as FP exceptions a

[PATCH] D91927: [X86] Add x86_amx type for intel AMX.

2020-11-24 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/IR/DataLayout.cpp:819 + case Type::X86_AMXTyID: +return Align(64); default: Should be 512 bits? Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:79 +// --> +// %addr = alloc

[PATCH] D91927: [X86] Add x86_amx type for intel AMX.

2020-11-24 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:164 +} +// %src = call x86_amx @llvm.x86.tileloadd64.internal(%row, %col, %addr, +// %stride); `%src` is not used here. Comment at: llvm

[PATCH] D89664: [X86] Add missing code in D89102 [X86] Add HRESET instruction.

2020-10-18 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: LuoYuanke, FreddyYe, RKSimon, craig.topper. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. pengfei requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.

[PATCH] D89301: [X86] Add user-level interrupt instructions

2020-10-18 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. You need to add test for macro UINTR in clang/test/Preprocessor/predefined-arch-macros.c for SapphireRapids. Comment at: llvm/docs/ReleaseNotes.rst:117 the target CPU. -* Support for ISA HRESET has been added. +* Support for HRESET and UINTR instru

[PATCH] D89664: [X86] Add missing code in D89102 [X86] Add HRESET instruction.

2020-10-20 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei abandoned this revision. pengfei added a comment. HRESET is not supported on Sapphire Rapids. Thanks for pointing it out. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89664/new/ https://reviews.llvm.org/D89664

[PATCH] D89184: Support complex target features combinations

2020-10-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. Herald added a subscriber: dexonsmith. LGTM. But I suggest you waiting for 1 or 2 days to see if other reviewers object. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89184/new/ https://reviews.llvm.org/D89184 __

[PATCH] D89301: [X86] Add User Interrupts(UINTR) instructions

2020-10-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 rGbe39a6fe6fc6: [X86] Add User Interrupts(UINTR) instructions (authored by tianqing, committed by pengfei). Changed prior to commit: https://reviews

[PATCH] D90009: [X86] VEX/EVEX prefix doesn't work for inline assembly.

2020-10-22 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/X86/att-inline-asm-prefix.c:12 +// CHECK: {evex} vcvtps2pd %xmm0, %xmm1 +"{vex} vcvtps2pd %xmm0, %xmm1\n\t" +"{vex2} vcvtps2pd %xmm0, %xmm1\n\t" Better adding a no prefix one. ===

[PATCH] D90009: [X86] VEX/EVEX prefix doesn't work for inline assembly.

2020-10-22 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:2824 ForcedVEXEncoding = VEXEncoding_VEX; + else if (Prefix == "vex2") +ForcedVEXEncoding = VEXEncoding_VEX2; I think it's reasonable if we generate "{

[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend

2020-10-27 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. I agreed with Craig. Emitting constrained intrinsics on an unsupported target may result in problems. It's better to check if it is supported and prevent from the front end. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87

[PATCH] D87981: [X86] AMX programming model prototype.

2020-10-27 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/amxintrin.h:69 +#undef __DEFAULT_FN_ATTRS + Better to use `__DEFAULT_FN_ATTRS_TILE`, `__DEFAULT_FN_ATTRS_INT8`, then you don't need to undef it in the middle. Comment at: clang/lib

[PATCH] D87981: [X86] AMX programming model prototype.

2020-10-28 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/amxintrin.h:259 +__DEFAULT_FN_ATTRS +void __tile_loadd(__tile *dst, const void *base, long stride) { + dst->tile = _tile_loadd_internal(dst->row, dst->col, base, stride); unsigned long long?

[PATCH] D90441: [X86] Add support for vex, vex2, vex3, and evex for MASM

2020-10-29 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/X86/ms-inline-asm-prefix.c:1 +// RUN:%clang_cc1 %s -ferror-limit 0 -triple=x86_64-pc-widows-msvc -target-feature +avx512f -target-feature +avx2 -target-feature +avx512vl -fasm-blocks -mllvm -x86-asm-syntax=intel -S -

[PATCH] D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched

2021-05-16 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG976a3e5f6141: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched (authored by TaoPan, committed by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D102577: TreeTransform.h: make the switch case more beautiful

2021-05-17 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. I think you can add a NFC in the title. Comment at: clang/lib/Sema/TreeTransform.h:3947-3949 NestedNameSpecifierLoc NNS, QualType ObjectType,

[PATCH] D102577: NFC: TreeTransform.h: make the function TransformNestedNameSpecifierLoc more beautiful

2021-05-17 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 for improving it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102577/new/ https://reviews.llvm.org/D102577 ___ cfe-commit

[PATCH] D98895: [X86][Draft] Disable long double type for -mno-x87 option

2021-05-18 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/Sema/x86-no-x87.c:48-61 +void assign2() { + struct st_long_double st; +#ifndef NOERROR + // expected-error@+2{{long double is not supported on this target}} +#endif + st.ld = 0.42; +} These seems pass with

[PATCH] D98895: [X86][Draft] Disable long double type for -mno-x87 option

2021-05-19 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/Sema/x86-no-x87.c:48-61 +void assign2() { + struct st_long_double st; +#ifndef NOERROR + // expected-error@+2{{long double is not supported on this target}} +#endif + st.ld = 0.42; +} asavonic wrote: > peng

[PATCH] D102577: NFC: TreeTransform.h: make the function TransformNestedNameSpecifierLoc more beautiful

2021-05-21 Thread Pengfei Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe6ec7ab5820f: NFC: TreeTransform.h: make the function TransformNestedNameSpecifierLoc moreā€¦ (authored by zhouyizhou, committed by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D98895: [X86][Draft] Disable long double type for -mno-x87 option

2021-05-25 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/Sema/x86-no-x87.c:2 +// RUN: %clang_cc1 -fsyntax-only -verify %s -triple x86_64-linux-gnu -target-feature -x87 +// RUN: %clang_cc1 -fsyntax-only -verify %s -triple i686-linux-gnu -target-feature -x87 +// RUN: %clang_cc1 -fsy

[PATCH] D98895: [X86][Draft] Disable long double type for -mno-x87 option

2021-05-25 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/Sema/x86-no-x87.c:2 +// RUN: %clang_cc1 -fsyntax-only -verify %s -triple x86_64-linux-gnu -target-feature -x87 +// RUN: %clang_cc1 -fsyntax-only -verify %s -triple i686-linux-gnu -target-feature -x87 +// RUN: %clang_cc1 -fsy

[PATCH] D98895: [X86][Draft] Disable long double type for -mno-x87 option

2021-05-27 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. But let's wait one or more days to see if others have more comments. Comment at: clang/lib/Sema/SemaChecking.cpp:4762 + + for (ParmVarDecl *Param : FDecl->parameters

[PATCH] D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC -EHa) - Part 1

2021-06-03 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. We found another crush: https://godbolt.org/z/vcbvddEKr Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80344/new/ https://reviews.llvm.org/D80344 ___ cfe-commits mailing list cfe-

[PATCH] D95421: [NFC] Refine some uninitialized used variables.

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

[PATCH] D94466: [X86] merge "={eax}" and "~{eax}" into "=&eax" for MSInlineASM

2021-01-26 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2490 + continue; +std::string::size_type position1 = Constraints.find("={eax}"); +if (position1 != std::string::npos) { If `Clobber` is `edx` only, we shouldn't chang

[PATCH] D94614: [FPEnv][X86] Platform builtins edition: clang should get from the AST the metadata for constrained FP builtins

2021-01-26 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94614/new/ https://reviews.llvm.org/D94614 ___ cfe-commits mailing list cfe-c

[PATCH] D94466: [X86] merge "={eax}" and "~{eax}" into "=&eax" for MSInlineASM

2021-01-26 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. Comment at: clang/lib/CodeGen/CGStmt.cpp:2491 +std::string::size_type position1 = +Constraints.find("={" + Clobber.str() + "}"); +if (posi

[PATCH] D93179: [X86] Convert fmin/fmax _mm_reduce_* intrinsics to emit llvm.reduction intrinsics (PR47506)

2021-02-01 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. Hi @RKSimon, what's the status of updating these reduce intrinsics? Is there any difficulty for always assigning them fast math flag? I received bug report for the previous change D92940 . Can we revert it if the problem is not easy to f

[PATCH] D93179: [X86] Convert fmin/fmax _mm_reduce_* intrinsics to emit llvm.reduction intrinsics (PR47506)

2021-02-06 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D93179#2535702 , @pengfei wrote: > Hi @RKSimon, what's the status of updating these reduce intrinsics? Is there > any difficulty for always assigning them fast math flag? I received bug > report for the previous change D92940

[PATCH] D96231: [X86] Always assign reassoc flag for intrinsics *reduce_add/mul_ps/pd.

2021-02-07 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: RKSimon, craig.topper, spatel. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Intrinsics *reduce_add/mul_ps/pd have assumption that the elements in the vector are reassociable

[PATCH] D93179: [X86] Convert fmin/fmax _mm_reduce_* intrinsics to emit llvm.reduction intrinsics (PR47506)

2021-02-07 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D93179#2547306 , @RKSimon wrote: > @pengfei I'm sorry I haven't gotten back to looking at this yet - it makes > sense to create a patch to revert the fadd/fmul reduction changes for > trunk/12.x. Thanks @RKSimon, I had a try

[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/ https://revi

[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 als

[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 llvm-test-s

[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 als

[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 w

[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/ https://reviews.llvm.org/

[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] 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] 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, m

  1   2   3   >