Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/CodeGen/M68k/Arith/bitwise.ll
Show First 20 Lines • Show All 224 Lines • ▼ Show 20 Lines | |||||
; CHECK-LABEL: eoril: | ; CHECK-LABEL: eoril: | ||||
; CHECK: ; %bb.0: | ; CHECK: ; %bb.0: | ||||
; CHECK-NEXT: move.l (4,%sp), %d0 | ; CHECK-NEXT: move.l (4,%sp), %d0 | ||||
; CHECK-NEXT: eori.l #305419896, %d0 | ; CHECK-NEXT: eori.l #305419896, %d0 | ||||
; CHECK-NEXT: rts | ; CHECK-NEXT: rts | ||||
%1 = xor i32 %a, 305419896 | %1 = xor i32 %a, 305419896 | ||||
ret i32 %1 | ret i32 %1 | ||||
} | } | ||||
define i64 @lshr64(i64 %a, i64 %b) nounwind { | |||||
; CHECK-LABEL: lshr64: | |||||
jrtc27: Regenerate the CHECK lines | |||||
Not Done ReplyInline ActionsOK. AnnikaCodes: OK. | |||||
; CHECK: ; %bb.0: | |||||
; CHECK-NEXT: suba.l #12, %sp | |||||
; CHECK-NEXT: move.l (28,%sp), (8,%sp) | |||||
; CHECK-NEXT: move.l (20,%sp), (4,%sp) | |||||
; CHECK-NEXT: move.l (16,%sp), (%sp) | |||||
; CHECK-NEXT: jsr __lshrdi3@PLT | |||||
jrtc27Unsubmitted Not Done ReplyInline ActionsHm now why is this being turned into a libcall, I'd expect Expand to inline it. RISC-V has custom lowering you could copy, but that lowering looks pretty generic (just turn XLEN into the width of the first operand). jrtc27: Hm now why is this being turned into a libcall, I'd expect Expand to inline it. RISC-V has… | |||||
AnnikaCodesUnsubmitted Yeah, the custom lowering does away with the call. AnnikaCodes: Yeah, the custom lowering does away with the call. | |||||
; CHECK-NEXT: adda.l #12, %sp | |||||
; CHECK-NEXT: rts | |||||
%1 = lshr i64 %a, %b | |||||
ret i64 %1 | |||||
} | |||||
define i64 @ashr64(i64 %a, i64 %b) nounwind { | |||||
; CHECK-LABEL: ashr64: | |||||
; CHECK: ; %bb.0: | |||||
; CHECK-NEXT: suba.l #12, %sp | |||||
; CHECK-NEXT: move.l (28,%sp), (8,%sp) | |||||
; CHECK-NEXT: move.l (20,%sp), (4,%sp) | |||||
; CHECK-NEXT: move.l (16,%sp), (%sp) | |||||
; CHECK-NEXT: jsr __ashrdi3@PLT | |||||
; CHECK-NEXT: adda.l #12, %sp | |||||
; CHECK-NEXT: rts | |||||
%1 = ashr i64 %a, %b | |||||
ret i64 %1 | |||||
} | |||||
define i64 @shl64(i64 %a, i64 %b) nounwind { | |||||
; CHECK-LABEL: shl64: | |||||
; CHECK: ; %bb.0: | |||||
; CHECK-NEXT: suba.l #12, %sp | |||||
; CHECK-NEXT: move.l (28,%sp), (8,%sp) | |||||
; CHECK-NEXT: move.l (20,%sp), (4,%sp) | |||||
; CHECK-NEXT: move.l (16,%sp), (%sp) | |||||
; CHECK-NEXT: jsr __ashldi3@PLT | |||||
; CHECK-NEXT: adda.l #12, %sp | |||||
; CHECK-NEXT: rts | |||||
%1 = shl i64 %a, %b | |||||
ret i64 %1 | |||||
} |
Regenerate the CHECK lines