Skip to content

Commit 8ce6b65

Browse files
nikictru
authored andcommitted
[PowerPC] Add test for #68783 (NFC)
(cherry picked from commit 0ead1fa)
1 parent 7a23a5d commit 8ce6b65

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

llvm/test/CodeGen/PowerPC/and-extend-combine.ll

+15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
22
; RUN: llc < %s -mtriple=powerpc64le-unknown-unknown -ppc-asm-full-reg-names \
33
; RUN: -mcpu=pwr8 -verify-machineinstrs | FileCheck %s
4+
45
define dso_local ptr @foo(i32 noundef zeroext %arg, ptr nocapture noundef readonly %arg1, ptr noundef writeonly %arg2) local_unnamed_addr {
56
; CHECK-LABEL: foo:
67
; CHECK: # %bb.0: # %bb
@@ -21,3 +22,17 @@ bb:
2122
%i8 = getelementptr inbounds i8, ptr %arg2, i64 %i7
2223
ret ptr %i8
2324
}
25+
26+
; FIXME: This is a miscompile.
27+
define void @pr68783(i32 %x, ptr %p) {
28+
; CHECK-LABEL: pr68783:
29+
; CHECK: # %bb.0:
30+
; CHECK-NEXT: rlwinm r3, r3, 31, 24, 31
31+
; CHECK-NEXT: stw r3, 0(r4)
32+
; CHECK-NEXT: blr
33+
%lshr = lshr i32 %x, 1
34+
%zext = zext i32 %lshr to i48
35+
%and = and i48 %zext, 255
36+
store i48 %and, ptr %p
37+
ret void
38+
}

0 commit comments

Comments
 (0)