-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[X86] movsd/movss/movd/movq - add support for constant comments #78601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1150,19 +1150,12 @@ define <16 x float>@test_int_x86_avx512_mask_vfnmadd_ps_512(<16 x float> %x0, <1 | |
|
||
; This test case used to crash due to combineFMA not bitcasting results of isFNEG. | ||
define <4 x float> @foo() { | ||
; X86-LABEL: foo: | ||
; X86: # %bb.0: # %entry | ||
; X86-NEXT: vmovss (%eax), %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xfa,0x10,0x00] | ||
; X86-NEXT: # xmm0 = mem[0],zero,zero,zero | ||
; X86-NEXT: vfmsub213ss {rd-sae}, %xmm0, %xmm0, %xmm0 # encoding: [0x62,0xf2,0x7d,0x38,0xab,0xc0] | ||
; X86-NEXT: retl # encoding: [0xc3] | ||
; | ||
; X64-LABEL: foo: | ||
; X64: # %bb.0: # %entry | ||
; X64-NEXT: vmovss (%rax), %xmm0 # EVEX TO VEX Compression encoding: [0xc5,0xfa,0x10,0x00] | ||
; X64-NEXT: # xmm0 = mem[0],zero,zero,zero | ||
; X64-NEXT: vfmsub213ss {rd-sae}, %xmm0, %xmm0, %xmm0 # encoding: [0x62,0xf2,0x7d,0x38,0xab,0xc0] | ||
; X64-NEXT: retq # encoding: [0xc3] | ||
; CHECK-LABEL: foo: | ||
; CHECK: # %bb.0: # %entry | ||
; CHECK-NEXT: vmovss {{.*#+}} xmm0 = mem[0],zero,zero,zero | ||
; CHECK-NEXT: # EVEX TO VEX Compression encoding: [0xc5,0xfa,0x10,0x00] | ||
Comment on lines
+1155
to
+1156
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The change seems unrelated, need to rebase? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its an ordering thing - moving to MI from MC means the constant/shuffle comment gets appended before the EVEX pass (see #78585 where I had to clean this up) |
||
; CHECK-NEXT: vfmsub213ss {rd-sae}, %xmm0, %xmm0, %xmm0 # encoding: [0x62,0xf2,0x7d,0x38,0xab,0xc0] | ||
; CHECK-NEXT: ret{{[l|q]}} # encoding: [0xc3] | ||
entry: | ||
%0 = load <4 x float>, ptr undef, align 16 | ||
%sub = fsub <4 x float> <float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00>, %0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the patch just changes the comments, why codegen affected here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instruction comes from inline assembly, when we had the comments in MC we could handle them, but not after moving to MI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I misunderstood it. The
0
is memory address, I took it as immediate.