Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Fix bitrev intrinsic #683

Merged
merged 1 commit into from
Feb 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cranelift-codegen/meta-python/base/legalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def widen_imm(signed, op):
b1 << band_imm(b, imm64(0xcc)),
b2 << ushr_imm(b1, imm64(2)),
b3 << band_imm(b, imm64(0x33)),
b4 << ushr_imm(b3, imm64(2)),
b4 << ishl_imm(b3, imm64(2)),
c << bor(b2, b4),
c1 << band_imm(c, imm64(0xf0)),
c2 << ushr_imm(c1, imm64(4)),
Expand All @@ -590,7 +590,7 @@ def widen_imm(signed, op):
b1 << band_imm(b, imm64(0xcccc)),
b2 << ushr_imm(b1, imm64(2)),
b3 << band_imm(b, imm64(0x3333)),
b4 << ushr_imm(b3, imm64(2)),
b4 << ishl_imm(b3, imm64(2)),
c << bor(b2, b4),
c1 << band_imm(c, imm64(0xf0f0)),
c2 << ushr_imm(c1, imm64(4)),
Expand All @@ -615,7 +615,7 @@ def widen_imm(signed, op):
b1 << band_imm(b, imm64(0xcccccccc)),
b2 << ushr_imm(b1, imm64(2)),
b3 << band_imm(b, imm64(0x33333333)),
b4 << ushr_imm(b3, imm64(2)),
b4 << ishl_imm(b3, imm64(2)),
c << bor(b2, b4),
c1 << band_imm(c, imm64(0xf0f0f0f0)),
c2 << ushr_imm(c1, imm64(4)),
Expand Down Expand Up @@ -643,7 +643,7 @@ def widen_imm(signed, op):
b1 << band_imm(b, imm64(0xcccccccccccccccc)),
b2 << ushr_imm(b1, imm64(2)),
b3 << band_imm(b, imm64(0x3333333333333333)),
b4 << ushr_imm(b3, imm64(2)),
b4 << ishl_imm(b3, imm64(2)),
c << bor(b2, b4),
c1 << band_imm(c, imm64(0xf0f0f0f0f0f0f0f0)),
c2 << ushr_imm(c1, imm64(4)),
Expand Down
8 changes: 4 additions & 4 deletions filetests/legalizer/bitrev.clif
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ebb0(v0: i8):
; check: v32 = band_imm v31, 51
; check: v9 = ireduce.i8 v32
; check: v33 = uextend.i32 v9
; check: v34 = ushr_imm v33, 2
; check: v34 = ishl_imm v33, 2
; check: v10 = ireduce.i8 v34
; check: v35 = uextend.i32 v8
; check: v36 = uextend.i32 v10
Expand Down Expand Up @@ -87,7 +87,7 @@ ebb0(v0: i16):
; check: v37 = band_imm v36, 0x3333
; check: v9 = ireduce.i16 v37
; check: v38 = uextend.i32 v9
; check: v39 = ushr_imm v38, 2
; check: v39 = ishl_imm v38, 2
; check: v10 = ireduce.i16 v39
; check: v40 = uextend.i32 v8
; check: v41 = uextend.i32 v10
Expand Down Expand Up @@ -142,7 +142,7 @@ ebb0(v0: i32):
; check: v7 = band v6, v25
; check: v8 = ushr_imm v7, 2
; check: v9 = band_imm v6, 0x3333_3333
; check: v10 = ushr_imm v9, 2
; check: v10 = ishl_imm v9, 2
; check: v11 = bor v8, v10
; check: v26 = iconst.i32 0xf0f0_f0f0
; check: v12 = band v11, v26
Expand Down Expand Up @@ -178,7 +178,7 @@ ebb0(v0: i64):
; check: v8 = ushr_imm v7, 2
; check: v32 = iconst.i64 0x3333_3333_3333_3333
; check: v9 = band v6, v32
; check: v10 = ushr_imm v9, 2
; check: v10 = ishl_imm v9, 2
; check: v11 = bor v8, v10
; check: v33 = iconst.i64 0xf0f0_f0f0_f0f0_f0f0
; check: v12 = band v11, v33
Expand Down