You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but separately, it's easy to see that since the last instruction is a zext, the high part of the result must contain zeroes (unless there's been a poison-related problem, but it doesn't look like there has been).
here's what we get from the aarch64 backend in llvm 14 and also top-of-tree:
Johns-MacBook-Pro:~ regehr$ ~/llvm-project/for-alive/bin/llc foo.ll -o - .section __TEXT,__text,regular,pure_instructions .build_version macos, 12, 0 .globl _f ; -- Begin function f .p2align 2_f: ; @f .cfi_startproc; %bb.0: sbfx x0, x0, #32, #16 ret .cfi_endproc ; -- End function.subsections_via_symbolsJohns-MacBook-Pro:~ regehr$
this ends up with a result where all the high bits are set:
This looks like a conflict between the selection code in AArch64DAGToDAGISel::tryBitfieldExtractOp and isDef32 used in the zext patterns, meaning it misses a mov w0, w0 that is needed to zero-extend the higher bits.
here's a function:
alive2 and the x86-64 backend agree that
f(0x0000800000000000) -> 0x00000000ffff8000
using this reasoning:
but separately, it's easy to see that since the last instruction is a zext, the high part of the result must contain zeroes (unless there's been a poison-related problem, but it doesn't look like there has been).
here's what we get from the aarch64 backend in llvm 14 and also top-of-tree:
this ends up with a result where all the high bits are set:
cc @ornata @nunoplopes @ryan-berger @nbushehri @zhengyang92 @aqjune @Hatsunespica
The text was updated successfully, but these errors were encountered: