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

2020-10-26 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added a comment. In D90009#2354849 , @kiranchandramohan wrote: > I have added a fix to run the test only when the X86 target is available. > Please feel free to change if it is not the correct fix. >

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

2020-10-26 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added a comment. I have added a fix to run the test only when the X86 target is available. Please feel free to change if it is not the correct fix. https://github.com/llvm/llvm-project/commit/c551ba0e90bd2b49ef501d591f8362ba44e5484d Repository: rG LLVM Github Monorepo

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

2020-10-26 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan added a comment. This change probably requires the X86 target. // REQUIRES: x86-registered-target Builds which target AArch64 only have been failing due to this change. http://lab.llvm.org:8011/#/builders/32/builds/291 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

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

2020-10-25 Thread LiuChen 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 rG180548c5c784: [X86] VEX/EVEX prefix doesnt work for inline assembly. (authored by LiuChen3). Repository: rG LLVM Github Monorepo CHANGES SINCE

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

2020-10-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper 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/D90009/new/ https://reviews.llvm.org/D90009

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

2020-10-23 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added inline comments. Comment at: llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp:352 + if (Flags & X86::Force_VEXEncoding) +O << "\t{vex}"; + else if (Flags & X86::Force_VEX2Encoding) pengfei wrote: > `"\t{vex}\t"` ? No "\t" needed to

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

2020-10-23 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 updated this revision to Diff 300188. LiuChen3 added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90009/new/ https://reviews.llvm.org/D90009 Files: clang/test/CodeGen/X86/att-inline-asm-prefix.c

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

2020-10-23 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3896 +// encoder. Prefixes |= X86::IP_USE_VEX3; +Prefixes |= X86::Force_VEX3Encoding; craig.topper wrote: > LiuChen3 wrote: > > craig.topper wrote: > > > Why

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

2020-10-23 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3896 +// encoder. Prefixes |= X86::IP_USE_VEX3; +Prefixes |= X86::Force_VEX3Encoding; LiuChen3 wrote: > craig.topper wrote: > > Why do we need

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

2020-10-23 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added inline comments. Comment at: clang/test/CodeGen/X86/att-inline-asm-prefix.c:14 +"{vex2} vcvtps2pd %xmm0, %xmm1\n\t" +"{vex3} vcvtps2pd %xmm0, %xmm1\n\t" +"{evex} vcvtps2pd %xmm0, %xmm1\n\t" > Does this bug only effect the printing of

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

2020-10-22 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Does this bug only effect the printing of inline assembly to a .s file? The encoder should work correctly even without this I think? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90009/new/

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

2020-10-22 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp:358 + else if (Flags & X86::Force_EVEXEncoding) +O << "\t{evex}"; } We also need to print {disp8} and {disp32} here to fix the same bug with those

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

2020-10-22 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp:354 + else if (Flags & X86::Force_VEX2Encoding) +O << "\t{vex2}"; + else if (Flags & X86::Force_VEX3Encoding) craig.topper wrote: > Is it important

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

2020-10-22 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3896 +// encoder. Prefixes |= X86::IP_USE_VEX3; +Prefixes |= X86::Force_VEX3Encoding; Why do we need Force_VEX3Encoding and IP_USE_VEX3?

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

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

[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] 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 LiuChen via Phabricator via cfe-commits
LiuChen3 created this revision. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. LiuChen3 requested review of this revision. For now, we lost the encoding information if we using inline assembly. The encoding for the inline assembly will keep