mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-08 04:51:23 +00:00
[WebAssembly] Also legalize sign_extend_inreg of i32->i64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0c2c493a1d
commit
3384127652
@ -159,7 +159,7 @@ WebAssemblyTargetLowering::WebAssemblyTargetLowering(
|
||||
|
||||
// As a special case, these operators use the type to mean the type to
|
||||
// sign-extend from.
|
||||
for (auto T : {MVT::i1, MVT::i8, MVT::i16})
|
||||
for (auto T : {MVT::i1, MVT::i8, MVT::i16, MVT::i32})
|
||||
setOperationAction(ISD::SIGN_EXTEND_INREG, T, Expand);
|
||||
|
||||
// Dynamic stack allocation: use the default expansion.
|
||||
|
@ -22,3 +22,12 @@ define i53 @shl_i53(i53 %a, i53 %b, i53* %p) {
|
||||
%t = shl i53 %a, %b
|
||||
ret i53 %t
|
||||
}
|
||||
|
||||
; CHECK-LABEL: sext_in_reg_i32_i64:
|
||||
; CHECK: i64.shl
|
||||
; CHECK: i64.shr_s
|
||||
define i64 @sext_in_reg_i32_i64(i64 %a) {
|
||||
%b = shl i64 %a, 32
|
||||
%c = ashr i64 %b, 32
|
||||
ret i64 %c
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user