Skip to content

LoopIdiom regression: ctlz no longer recognized #51064

@davidbolvansky

Description

@davidbolvansky
Bugzilla Link 51722
Version trunk
OS Linux
Blocks #50580 #51489
CC @topperc,@LebedevRI,@RKSimon,@nikic,@rotateright,@tstellar

Extended Description

unsigned long long FIO_highbit64(unsigned long long v)
{
unsigned count = 0;
v >>= 1;
while (v) { v >>= 1; count++; }
return count;
}

Since LLVM 13, we lost recognized "@llvm.ctlz.i64".

https://godbolt.org/z/nodKdfab4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions