CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
110 lines
3.2 KiB
YAML
110 lines
3.2 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -mtriple x86_64 -run-pass=x86-prelegalizer-combiner %s -o - | FileCheck %s
|
|
# RUN: llc -mtriple x86_64 -passes=x86-prelegalizer-combiner-pass %s -o - | FileCheck %s
|
|
|
|
---
|
|
name: dont_fold_sub
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.1.entry:
|
|
liveins: $eax
|
|
; Not an identity, no folding.
|
|
; CHECK-LABEL: name: dont_fold_sub
|
|
; CHECK: liveins: $eax
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %x:_(s32) = COPY $eax
|
|
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
|
|
; CHECK-NEXT: %op:_(s32) = G_ADD %x, [[C]]
|
|
; CHECK-NEXT: $eax = COPY %op(s32)
|
|
; CHECK-NEXT: RET implicit $eax
|
|
%x:_(s32) = COPY $eax
|
|
%cst:_(s32) = G_CONSTANT i32 1
|
|
%op:_(s32) = G_SUB %x(s32), %cst
|
|
$eax = COPY %op(s32)
|
|
RET implicit $eax
|
|
...
|
|
---
|
|
name: sub_to_add
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.1.entry:
|
|
liveins: $eax
|
|
; CHECK-LABEL: name: sub_to_add
|
|
; CHECK: liveins: $eax
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %x:_(s32) = COPY $eax
|
|
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
|
|
; CHECK-NEXT: %op:_(s32) = G_ADD %x, [[C]]
|
|
; CHECK-NEXT: $eax = COPY %op(s32)
|
|
; CHECK-NEXT: RET implicit $eax
|
|
%x:_(s32) = COPY $eax
|
|
%cst:_(s32) = G_CONSTANT i32 1
|
|
%op:_(s32) = G_SUB %x(s32), %cst
|
|
$eax = COPY %op(s32)
|
|
RET implicit $eax
|
|
...
|
|
---
|
|
name: sub_to_add_nuw
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.1.entry:
|
|
liveins: $eax
|
|
; CHECK-LABEL: name: sub_to_add_nuw
|
|
; CHECK: liveins: $eax
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %x:_(s32) = COPY $eax
|
|
; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
|
|
; CHECK-NEXT: %op:_(s32) = G_ADD %x, [[C]]
|
|
; CHECK-NEXT: $eax = COPY %op(s32)
|
|
; CHECK-NEXT: RET implicit $eax
|
|
%x:_(s32) = COPY $eax
|
|
%cst:_(s32) = G_CONSTANT i32 1
|
|
%op:_(s32) = nuw G_SUB %x(s32), %cst
|
|
$eax = COPY %op(s32)
|
|
RET implicit $eax
|
|
...
|
|
---
|
|
name: sub_to_add_nsw_128
|
|
body: |
|
|
bb.0:
|
|
liveins: $eax, $ebx
|
|
|
|
; CHECK-LABEL: name: sub_to_add_nsw_128
|
|
; CHECK: liveins: $eax, $ebx
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %a:_(s32) = COPY $eax
|
|
; CHECK-NEXT: %b:_(s8) = G_TRUNC %a(s32)
|
|
; CHECK-NEXT: %c:_(s8) = G_CONSTANT i8 -128
|
|
; CHECK-NEXT: %add:_(s8) = G_ADD %b, %c
|
|
; CHECK-NEXT: %d:_(s32) = G_ZEXT %add(s8)
|
|
; CHECK-NEXT: $eax = COPY %d(s32)
|
|
; CHECK-NEXT: RET implicit $rax
|
|
%a:_(s32) = COPY $eax
|
|
%b:_(s8) = G_TRUNC %a
|
|
%c:_(s8) = G_CONSTANT i8 -128
|
|
%add:_(s8) = nsw nuw G_SUB %b, %c
|
|
%d:_(s32) = G_ZEXT %add
|
|
$eax = COPY %d
|
|
RET implicit $rax
|
|
...
|
|
---
|
|
name: sub_to_add_nsw_intmin
|
|
body: |
|
|
bb.0:
|
|
liveins: $eax, $ebx
|
|
|
|
; CHECK-LABEL: name: sub_to_add_nsw_intmin
|
|
; CHECK: liveins: $eax, $ebx
|
|
; CHECK-NEXT: {{ $}}
|
|
; CHECK-NEXT: %a:_(s32) = COPY $eax
|
|
; CHECK-NEXT: %c:_(s32) = G_CONSTANT i32 -2147483648
|
|
; CHECK-NEXT: %add:_(s32) = G_ADD %a, %c
|
|
; CHECK-NEXT: $eax = COPY %add(s32)
|
|
; CHECK-NEXT: RET implicit $rax
|
|
%a:_(s32) = COPY $eax
|
|
%c:_(s32) = G_CONSTANT i32 -2147483648
|
|
%add:_(s32) = nsw nuw G_SUB %a, %c
|
|
$eax = COPY %add
|
|
RET implicit $rax
|
|
...
|