mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
[mips] Avoid redundant sign extension of the result of binary bitwise instructions.
Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7581 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229675 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -51,10 +51,7 @@ define signext i32 @and_i32(i32 signext %a, i32 signext %b) {
|
||||
entry:
|
||||
; ALL-LABEL: and_i32:
|
||||
|
||||
; GP32: and $2, $4, $5
|
||||
|
||||
; GP64: and $[[T0:[0-9]+]], $4, $5
|
||||
; GP64: sll $2, $[[T0]], 0
|
||||
; ALL: and $2, $4, $5
|
||||
|
||||
%r = and i32 %a, %b
|
||||
ret i32 %r
|
||||
|
||||
@@ -51,11 +51,7 @@ define signext i32 @or_i32(i32 signext %a, i32 signext %b) {
|
||||
entry:
|
||||
; ALL-LABEL: or_i32:
|
||||
|
||||
; GP32: or $2, $4, $5
|
||||
|
||||
; GP64: or $[[T0:[0-9]+]], $4, $5
|
||||
; FIXME: The sll instruction below is redundant.
|
||||
; GP64: sll $2, $[[T0]], 0
|
||||
; ALL: or $2, $4, $5
|
||||
|
||||
%r = or i32 %a, %b
|
||||
ret i32 %r
|
||||
|
||||
@@ -51,10 +51,7 @@ define signext i32 @xor_i32(i32 signext %a, i32 signext %b) {
|
||||
entry:
|
||||
; ALL-LABEL: xor_i32:
|
||||
|
||||
; GP32: xor $2, $4, $5
|
||||
|
||||
; GP64: xor $[[T0:[0-9]+]], $4, $5
|
||||
; GP64: sll $2, $[[T0]], 0
|
||||
; ALL: xor $2, $4, $5
|
||||
|
||||
%r = xor i32 %a, %b
|
||||
ret i32 %r
|
||||
|
||||
Reference in New Issue
Block a user