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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to