[llvm-bugs] [Bug 50278] New: LLVM IR - Instcombine: creates unneeded extensions
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun May 9 01:35:45 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50278
Bug ID: 50278
Summary: LLVM IR - Instcombine: creates unneeded extensions
Product: new-bugs
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: alon.kom at intel.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Created attachment 24844
--> https://bugs.llvm.org/attachment.cgi?id=24844&action=edit
The reproducing test and its workaround
In the attached test (test.c) in the test() function Instcombine doesn't fold
the unneeded i32 extension, instead of using the smaller types of i8 and i16.
In the workaround version test_workaround() function where the 8 constant is
replaced with an argument, InstCombine uses the i8, i16 types as expected.
Both functions are compiled with clang -O2 -S -march=core-avx2.
As can be seen in the assembly files after compiling, the test is compiled with
11 instructions instead of 8 with the workaround.
--
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/20210509/3bdbfcb3/attachment.html>
More information about the llvm-bugs
mailing list