Skip to content

Conversation

@houngkoungting
Copy link
Contributor

FIX #155386

My LLVM version was too old, so I updated to a newer one.

@RKSimon

houngkoungting and others added 19 commits August 6, 2025 16:20
@RKSimon RKSimon self-requested a review September 17, 2025 08:16
Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few minors

@@ -0,0 +1,138 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mtriple=x86_64-- -mattr=+avx512ifma,+avx512vl | FileCheck %s --check-prefixes=AVX512VL
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add avxifma support, even if it means we drop the 512-bit test coverage

%r = call <2 x i64> @llvm.x86.avx512.vpmadd52h.uq.128(
<2 x i64> <i64 1, i64 1>, ; acc
<2 x i64> %mx, ; x (masked to 25-bit)
<2 x i64> %my) ; y (masked to 25-bit)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these per-operand comment really aren't necessary - a short single line comment above the define along witha descriptive function name is all that is necessary

; AVX512VL-NEXT: # xmm0 = mem[0,0]
; AVX512VL-NEXT: retq
%mx = and <2 x i64> %x, <i64 33554431, i64 33554431>
%my = and <2 x i64> %y, <i64 33554431, i64 33554431>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to use splat for uniform constant for breveity and remove the "25-bit/26-bit" comments and put them in the IR - nobody is ever going to go looking far for a description of a constant

%mx  = and <2 x i64> %x, splat (i64 33554431) ; (1<<25)-1
%my  = and <2 x i64> %y, splat (i64 33554431) ; (1<<25)-1

Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - cheers

@RKSimon RKSimon enabled auto-merge (squash) September 22, 2025 09:14
@RKSimon RKSimon merged commit dc6a915 into llvm:main Sep 22, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[X86] X86TargetLowering::computeKnownBitsForTargetNode - add handling for VPMADD52L/VPMADD52H nodes

2 participants