2018-11-20 12:42:31 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2019-03-07 02:49:39 +08:00
|
|
|
; RUN: llc < %s -mtriple=powerpc64le-unknown-unknown -verify-machineinstrs | FileCheck %s --check-prefix=CHECKLE
|
|
|
|
; RUN: llc < %s -mtriple=powerpc64-unknown-unknown -verify-machineinstrs | FileCheck %s --check-prefix=CHECKBE
|
2018-11-20 12:42:31 +08:00
|
|
|
|
2019-03-07 02:49:39 +08:00
|
|
|
define void @pr39478(i64* %p64, i32* %p32) {
|
|
|
|
; CHECKLE-LABEL: pr39478:
|
|
|
|
; CHECKLE: # %bb.0: # %entry
|
[DAGCombine] Prune unnused nodes.
Summary:
Nodes that have no uses are eventually pruned when they are selected
from the worklist. Record nodes newly added to the worklist or DAG and
perform pruning after every combine attempt.
Reviewers: efriedma, RKSimon, craig.topper, spatel, jyknight
Reviewed By: jyknight
Subscribers: jdoerfert, jyknight, nemanjai, jvesely, nhaehnle, javed.absar, hiraditya, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58070
llvm-svn: 357283
2019-03-30 01:35:56 +08:00
|
|
|
; CHECKLE-NEXT: lbz 3, 4(3)
|
2019-03-07 02:49:39 +08:00
|
|
|
; CHECKLE-NEXT: stb 3, 0(4)
|
|
|
|
; CHECKLE-NEXT: blr
|
|
|
|
;
|
|
|
|
; CHECKBE-LABEL: pr39478:
|
|
|
|
; CHECKBE: # %bb.0: # %entry
|
[DAGCombine] Prune unnused nodes.
Summary:
Nodes that have no uses are eventually pruned when they are selected
from the worklist. Record nodes newly added to the worklist or DAG and
perform pruning after every combine attempt.
Reviewers: efriedma, RKSimon, craig.topper, spatel, jyknight
Reviewed By: jyknight
Subscribers: jdoerfert, jyknight, nemanjai, jvesely, nhaehnle, javed.absar, hiraditya, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D58070
llvm-svn: 357283
2019-03-30 01:35:56 +08:00
|
|
|
; CHECKBE-NEXT: lbz 3, 3(3)
|
2019-03-07 02:49:39 +08:00
|
|
|
; CHECKBE-NEXT: stb 3, 3(4)
|
|
|
|
; CHECKBE-NEXT: blr
|
2018-11-20 12:42:31 +08:00
|
|
|
entry:
|
2019-03-07 02:49:39 +08:00
|
|
|
%tmp32 = load i64, i64* %p64, align 8
|
|
|
|
%tmp33 = load i32, i32* %p32, align 4
|
2018-11-20 12:42:31 +08:00
|
|
|
%tmp34 = and i32 %tmp33, -256
|
|
|
|
%tmp35 = lshr i64 %tmp32, 32
|
|
|
|
%tmp36 = shl nuw nsw i64 %tmp35, 24
|
|
|
|
%tmp37 = trunc i64 %tmp36 to i32
|
|
|
|
%tmp38 = call i32 @llvm.bswap.i32(i32 %tmp37)
|
|
|
|
%tmp39 = or i32 %tmp38, %tmp34
|
2019-03-07 02:49:39 +08:00
|
|
|
store i32 %tmp39, i32* %p32, align 4
|
2018-11-20 12:42:31 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i32 @llvm.bswap.i32(i32)
|