[llvm-bugs] [Bug 30437] New: [AArch64] Unnecessary mask instruction on AArch64
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Sep 17 19:01:39 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30437
Bug ID: 30437
Summary: [AArch64] Unnecessary mask instruction on AArch64
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: yyc1992 at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
When compiling the following C program.
```c
typedef struct {
char a;
char b;
} ntuple2_t;
ntuple2_t g(void);
ntuple2_t f(void)
{
return g();
}
```
The LLVM IR generated on AArch64 is
```llvm
define i64 @f() local_unnamed_addr #0 {
%1 = tail call i64 @g() #2
%2 = and i64 %1, 65535
ret i64 %2
}
```
Here the `and` instruction is not really necessary since `g` and `f` follows
the same calling convention.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160918/cba199b8/attachment.html>
More information about the llvm-bugs
mailing list