llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

AVX512F lowers zext from i1 to i64 through a k-mask

Open llvmbot opened this issue 10 years ago • 9 comments

Bugzilla Link 28175
Resolution FIXED
Resolved on Jun 05, 2017 08:17
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @topperc,@delena,@hfinkel,@igor-breger,@ZviRackover

Extended Description

For

long long bar();

long long foo(bool i, int j) { if (j) return bar(); return i; }

With -mavx512f, we get:

foo(bool, int): # @​foo(bool, int) testl %esi, %esi je .LBB0_1 jmp bar() # TAILCALL .LBB0_1: andl $1, %edi kmovw %edi, %k0 kmovw %k0, %eax andq $1, %rax retq

llvmbot avatar Jun 17 '16 19:06 llvmbot

closing this since it does not happen anymore

llvmbot avatar Jun 05 '17 15:06 llvmbot

This may be fixed by r298984.

topperc avatar Mar 29 '17 07:03 topperc

Please disregard my last comment. Should be:

After commit 281302 the generated code is slightly improved. However, the main issue of redundant copies thru k-regs remains:

    testl   %esi, %esi
    je      .LBB0_1

BB#2: # %if.then

    jmp     _Z3barv                 # TAILCALL

.LBB0_1: # %return kmovw %edi, %k0 kmovw %k0, %eax andq $1, %rax retq

ZviRackover avatar Sep 28 '16 13:09 ZviRackover

The commit Elena referred to to in the previous commit is 281302. It was reverted since, so this issue remains unresolved.

ZviRackover avatar Sep 28 '16 12:09 ZviRackover

Fixed in r24456

delena avatar Sep 14 '16 08:09 delena

Reopening, since r274626 has been reverted by r279782.

llvmbot avatar Aug 25 '16 23:08 llvmbot

Fixed in 274626.

delena avatar Jul 26 '16 14:07 delena

This has been fixed in r274626, right?

llvmbot avatar Jul 22 '16 00:07 llvmbot

assigned to @delena

llvmbot avatar Jun 17 '16 19:06 llvmbot