Skip to content

Commit d85aaab

Browse files
author
Thorsten Schütt
committed
address review comments II
1 parent 20018c1 commit d85aaab

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
# RUN: llc -mtriple aarch64 -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
3+
4+
5+
---
6+
name: icmp_samesign
7+
body: |
8+
bb.0:
9+
liveins: $w0, $w1
10+
11+
; CHECK-LABEL: name: icmp_samesign
12+
; CHECK: liveins: $w0, $w1
13+
; CHECK-NEXT: {{ $}}
14+
; CHECK-NEXT: %y:_(s32) = COPY $w1
15+
; CHECK-NEXT: %cmp:_(s1) = samesign G_ICMP intpred(eq), %y(s32), %y
16+
; CHECK-NEXT: %zext:_(s32) = G_ZEXT %cmp(s1)
17+
; CHECK-NEXT: $w0 = COPY %zext(s32)
18+
; CHECK-NEXT: RET_ReallyLR implicit $w0
19+
%x:_(s32) = COPY $w0
20+
%y:_(s32) = COPY $w1
21+
%cmp:_(s1) = samesign G_ICMP intpred(eq), %y:_(s32), %y:_
22+
%zext:_(s32) = G_ZEXT %cmp:_(s1)
23+
$w0 = COPY %zext
24+
RET_ReallyLR implicit $w0
25+
26+
---
27+
name: icmp_differentsign
28+
body: |
29+
bb.0:
30+
liveins: $w0, $w1
31+
32+
%x:_(s32) = COPY $w0
33+
%y:_(s32) = COPY $w1
34+
%cmp:_(s1) = G_ICMP intpred(eq), %y:_(s32), %y:_
35+
%zext:_(s32) = G_ZEXT %cmp:_(s1)
36+
$w0 = COPY %zext
37+
RET_ReallyLR implicit $w0

llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-samesign.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
2-
; RUN: llc -mtriple=aarch64-linux-gnu -O0 -stop-after=irtranslator -global-isel %s -o - 2>&1 | FileCheck %s
2+
; RUN: llc -global-isel -mtriple=aarch64-linux-gnu -O0 -stop-after=irtranslator < %s | FileCheck %s
33

44

55
define <2 x i1> @call_icmp_samesign_vector(<2 x i32> %a, <2 x i32> %b) {

0 commit comments

Comments
 (0)