-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Closed
Labels
backend:AArch64missed-optimizationquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
#include <stdint.h>
uint8_t f(uint8_t x, uint64_t n) {
return (uint16_t)((x << 1) | (x << 8)) >> n;
}f(unsigned char, unsigned long):
ubfiz w8, w0, #1, #8
orr w8, w8, w0, lsl #8
and w8, w8, #0xfffe ; why is this `and` here? `unfiz` should've zeroed the lowest bit
lsr w0, w8, w1
retHappens during isel, not sure why.
Metadata
Metadata
Assignees
Labels
backend:AArch64missed-optimizationquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!