# 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: sdiv_0 tracksRegLiveness: true body: | bb.1.entry: liveins: $eax ; Fold (0 / x) -> 0 ; CHECK-LABEL: name: sdiv_0 ; CHECK: liveins: $eax ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: %cst:_(s32) = G_CONSTANT i32 0 ; CHECK-NEXT: $eax = COPY %cst(s32) ; CHECK-NEXT: RET implicit $eax %x:_(s32) = COPY $eax %cst:_(s32) = G_CONSTANT i32 0 %op:_(s32) = G_SDIV %cst, %x $eax = COPY %op(s32) RET implicit $eax ... --- name: udiv_0 tracksRegLiveness: true body: | bb.1.entry: liveins: $eax ; Fold (0 / x) -> 0 ; CHECK-LABEL: name: udiv_0 ; CHECK: liveins: $eax ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: %cst:_(s32) = G_CONSTANT i32 0 ; CHECK-NEXT: $eax = COPY %cst(s32) ; CHECK-NEXT: RET implicit $eax %x:_(s32) = COPY $eax %cst:_(s32) = G_CONSTANT i32 0 %op:_(s32) = G_UDIV %cst, %x $eax = COPY %op(s32) RET implicit $eax ...