-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland "[PowerPC] Remove extend between shift and and"
The commit originally caused a bootstrap failure on the big endian PPC bot as the combine was interfering with the legalizer when applied on illegal types. This update restricts the combine to the only types for which it is actually needed. Tested on PPC BE bootstrap locally.
- Loading branch information
Showing
2 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
; 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 | ||
; CHECK-NEXT: rlwinm r3, r3, 31, 17, 28 | ||
; CHECK-NEXT: ldx r4, r4, r3 | ||
; CHECK-NEXT: clrldi r3, r4, 56 | ||
; CHECK-NEXT: add r3, r5, r3 | ||
; CHECK-NEXT: std r4, 0(r5) | ||
; CHECK-NEXT: blr | ||
bb: | ||
%i = lshr i32 %arg, 1 | ||
%i3 = and i32 %i, 32760 | ||
%i4 = zext i32 %i3 to i64 | ||
%i5 = getelementptr inbounds i8, ptr %arg1, i64 %i4 | ||
%i6 = load i64, ptr %i5, align 8 | ||
%i7 = and i64 %i6, 255 | ||
store i64 %i6, ptr %arg2, align 8 | ||
%i8 = getelementptr inbounds i8, ptr %arg2, i64 %i7 | ||
ret ptr %i8 | ||
} |