diff options
author | Nikita Popov <npopov@redhat.com> | 2023-10-11 12:14:31 +0200 |
---|---|---|
committer | Tobias Hieta <tobias@hieta.se> | 2023-10-17 08:12:03 +0200 |
commit | 8ce6b65c89adaabf6e1ad900c2a381241675cc0c (patch) | |
tree | 06cb7bc475c72b647d8e52140fc94e69b0277475 | |
parent | [clang-format] Fix a bug in RemoveParentheses: ReturnStatement (#67911) (diff) | |
download | llvm-project-8ce6b65c89adaabf6e1ad900c2a381241675cc0c.tar.gz llvm-project-8ce6b65c89adaabf6e1ad900c2a381241675cc0c.tar.bz2 llvm-project-8ce6b65c89adaabf6e1ad900c2a381241675cc0c.zip |
[PowerPC] Add test for #68783 (NFC)
(cherry picked from commit 0ead1faef0bfaea499c3b2d13ab417f6bf3f67e1)
-rw-r--r-- | llvm/test/CodeGen/PowerPC/and-extend-combine.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/and-extend-combine.ll b/llvm/test/CodeGen/PowerPC/and-extend-combine.ll index b05d0097154a..50604d8ef32a 100644 --- a/llvm/test/CodeGen/PowerPC/and-extend-combine.ll +++ b/llvm/test/CodeGen/PowerPC/and-extend-combine.ll @@ -1,6 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2 ; RUN: llc < %s -mtriple=powerpc64le-unknown-unknown -ppc-asm-full-reg-names \ ; RUN: -mcpu=pwr8 -verify-machineinstrs | FileCheck %s + define dso_local ptr @foo(i32 noundef zeroext %arg, ptr nocapture noundef readonly %arg1, ptr noundef writeonly %arg2) local_unnamed_addr { ; CHECK-LABEL: foo: ; CHECK: # %bb.0: # %bb @@ -21,3 +22,17 @@ bb: %i8 = getelementptr inbounds i8, ptr %arg2, i64 %i7 ret ptr %i8 } + +; FIXME: This is a miscompile. +define void @pr68783(i32 %x, ptr %p) { +; CHECK-LABEL: pr68783: +; CHECK: # %bb.0: +; CHECK-NEXT: rlwinm r3, r3, 31, 24, 31 +; CHECK-NEXT: stw r3, 0(r4) +; CHECK-NEXT: blr + %lshr = lshr i32 %x, 1 + %zext = zext i32 %lshr to i48 + %and = and i48 %zext, 255 + store i48 %and, ptr %p + ret void +} |