This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add tests for transform `(icmp eq/ne (and X, C0), (shift X, C1))`; NFC
ClosedPublic

Authored by goldstein.w.n on Jun 4 2023, 12:46 PM.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Jun 4 2023, 12:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2023, 12:46 PM
goldstein.w.n requested review of this revision.Jun 4 2023, 12:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2023, 12:46 PM

Update tests with ror + vec cases

RKSimon added inline comments.Jun 28 2023, 3:12 AM
llvm/test/CodeGen/X86/cmp-shiftX-maskX.ll
4

missing CHECK-SSE2?

goldstein.w.n marked an inline comment as done.

Add SSE2 tests

RKSimon added inline comments.Jun 28 2023, 9:30 AM
llvm/test/CodeGen/X86/cmp-shiftX-maskX.ll
6

Sorry - miscommunication, SSE2 is implicit in the bmi2 targets on line 3 - you just need to add a CHECK-BMI2-SSE2 to it, and drop the duplicate -mattr=+bmi2,+sse2

RKSimon added inline comments.Sep 20 2023, 5:15 AM
llvm/test/CodeGen/X86/cmp-shiftX-maskX.ll
8

I think this is all you need:

; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefixes=CHECK,CHECK-NOBMI,CHECK-SSE2,CHECK-NOBMI-SSE2
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+bmi2 | FileCheck %s --check-prefixes=CHECK,CHECK-BMI2,CHECK-SSE2,CHECK-BMI2-SSE2
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+bmi2,+avx2 | FileCheck %s --check-prefixes=CHECK,CHECK-BMI2,CHECK-AVX,CHECK-AVX2
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+bmi2,+avx512f,+avx512vl | FileCheck %s --check-prefixes=CHECK,CHECK-BMI2,CHECK-AVX,CHECK-AVX512

Cleanup checks

goldstein.w.n marked an inline comment as done.Sep 20 2023, 9:55 AM

@goldstein.w.n Is this patch still live?

@goldstein.w.n Is this patch still live?

I would like to still get it in. Would you like me to port the series to GH?

RKSimon accepted this revision.Oct 17 2023, 9:45 AM

LGTM

This revision is now accepted and ready to land.Oct 17 2023, 9:45 AM