https://bugs.llvm.org/show_bug.cgi?id=40055
Bug ID: 40055
Summary: [AArch64] Suboptimal immediate encoding with add/sub
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: AArch64
Assignee: unassignedb...@nondot.org
Reporter: aman...@gmail.com
CC: arnaud.degrandmai...@arm.com,
llvm-bugs@lists.llvm.org, peter.sm...@linaro.org,
ties.st...@arm.com
This IR:
%2 = sub i64 %0, 72340172838076673 ; 0x0101010101010101
Generates the following assembly:
mov x8, #-72340172838076674
movk x8, #65279
add x0, x0, x8
However the immediate can be encoded in a single instruction if it is not
negated:
mov x8, #72340172838076673
sub x0, x0, x8
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs