- Mar 22, 2021
-
-
Fangrui Song authored
-
Fangrui Song authored
They are quite outdated. Delete them to avoid unnecessary test churn.
-
Jacques Pienaar authored
-
Nico Weber authored
This reverts commit c53a1322. Test only passes depending on build dir having a lexicographically later name than the source dir, and doesn't link on mac/win. See https://reviews.llvm.org/D98559#2640265 onward.
-
Roman Lebedev authored
This restores the original behaviour before i unadvertedly broke it in e3a47016 and clang/test/Profile/ caught it.
-
Roman Lebedev authored
08196e0b exposed LowerExpectIntrinsic's internal implementation detail in the form of LikelyBranchWeight/UnlikelyBranchWeight options to the outside. While this isn't incorrect from the results viewpoint, this is suboptimal from the layering viewpoint, and causes confusion - should transforms also use those weights, or should they use something else, D98898? So go back to status quo by making LikelyBranchWeight/UnlikelyBranchWeight internal again, and fixing all the code that used it directly, which currently is only clang codegen, thankfully, to emit proper @llvm.expect intrinsics instead.
-
Roman Lebedev authored
Upon reviewing D98898 i've come to realization that these are implementation detail of LowerExpectIntrinsicPass, and they should not be exposed to outside of it. This reverts commit ee8b5381.
-
Fangrui Song authored
With this change, on Debian x86-64 (with a MULTILIB_OSDIRNAMES local patch ../lib64 -> ../lib; this does not matter because /usr/lib64/crt{1,i,n}.o do not exist), `clang++ --target=aarch64-linux-gnu a.cc -Wl,--dynamic-linker=/usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 -Wl,-rpath,/usr/aarch64-linux-gnu/lib` built executable can run under qemu-user. Previously this failed with `/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../include/c++/10/iostream:38:10: fatal error: 'bits/c++config.h' file not found` On Arch Linux, due to the MULTILIB_OSDIRNAMES patch and the existence of /usr/lib64/crt{1,i,n}.o, clang driver may pick /usr/lib64/crt{1,i,n}.o and cause a linker error. -B can work around the problem. `clang++ --target=aarch64-linux-gnu -B /usr/aarch64-linux-gnu/lib a.cc -Wl,--dynamic-linker=/usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 -Wl,-rpath,/usr/aarch64-linux-gnu/lib64:/usr/aarch64-linux-gnu/lib` -
Vy Nguyen authored
Bug: https://bugs.llvm.org/show_bug.cgi?id=49278 The flag is not well documented, so this implementation is based on observed behaviour. When specified, `-dependency_info <path>` produced a text file containing information pertaining to the current linkage, such as input files, output file, linker version, etc. This file's layout is also not documented, but it seems to be a series of null ('\0') terminated strings in the form `<op code><path>` `<op code>` could be: `0x00` : linker version `0x10` : input `0x11` : files not found(??) `0x40` : output `<path>` : is the file path, except for the linker-version case. (??) This part is a bit unclear. I think it means all the files the linker attempted to look at, but could not find. Differential Revision: https://reviews.llvm.org/D98559
-
Craig Topper authored
[DAGCombiner] Minor compile time improvement to (sext_in_reg (sign_extend_vector_inreg x)) optimization. Don't bother calling ComputeNumSignBits if N00Bits < ExtVTBits. No matter what answer we get back this will be true: (N00Bits - DAG.ComputeNumSignBits(N00, DemandedSrcElts)) < ExtVTBits) So we might as well save the computation. This makes the code more consistent with the similar (sext_in_reg (sext x)) handling above.
-
Nikita Popov authored
X != X * C is true if: * C is not 0 or 1 * X is not 0 * mul is nsw or nuw Proof: https://alive2.llvm.org/ce/z/uwF29z This is motivated by one of the cases in D98422.
-
Nikita Popov authored
This is for the case of (x * C) == x, rather than the (x * C1) == (x * C2) variant that we already cover.
-
Chris Lattner authored
-
Matt Arsenault authored
-
Matt Arsenault authored
The pseudo was using SSrc_b64, so it allowed folding immediates into the destination operand for a tail call to null. However, this is not a valid operand for the s_setpc_b64 this will be lowered to. Avoids printing the operand as an invalid immediate. Avoids a regression when tail calls are enabled in GlobalISel (somehow tail calls to null get deleted in the DAG).
-
Chris Lattner authored
mlir/lib/Dialect/Shape/IR/Shape.cpp:573:26: warning: loop variable 'shape' is always a copy because the range of type '::mlir::Operation::operand_range' (aka 'mlir::OperandRange') does not return a reference [-Wrange-loop-analysis] for (const auto &shape : shapes()) { ^ -
Chris Lattner authored
This updates the codebase to pass the context when creating an instance of OwningRewritePatternList, and starts removing extraneous MLIRContext parameters. There are many many more to be removed. Differential Revision: https://reviews.llvm.org/D99028
-
Nikita Popov authored
There seems to be an impedance mismatch between what the type system considers an aggregate (structs and arrays) and what constants consider an aggregate (structs, arrays and vectors). Adjust the type check to consider vectors as well. The previous version of the patch dropped the type check entirely, but it turns out that getAggregateElement() does require the constant to be an aggregate in some edge cases: For Poison/Undef the getNumElements() API is called, without checking in advance that we're dealing with an aggregate. Possibly the implementation should avoid doing that, but for now I'm adding an assert so the next person doesn't fall into this trap.
-
Nikita Popov authored
To make sure this doesn't crash the following commit.
-
Nikita Popov authored
-
- Mar 21, 2021
-
-
Nikita Popov authored
This tests for binops with identity elements.
-
Nikita Popov authored
Replace Op with RepOp up-front, and then always work with the new operands, rather than checking for replacement in various places.
-
Matt Arsenault authored
We can just directly pass through the APInt to create a new constant.
-
Matt Arsenault authored
-
Simon Pilgrim authored
As commented by @craig.topper on rG1ba5c550, we can't guarantee that we'll be extending zero bits, just sign bit. So, revert to the old code for zero_extend_vector_inreg cases.
-
Jez Ng authored
Summary: A good chunk of it was mis-indented. Fixed by using the formatting settings from llvm/utils/vim.
-
Simon Pilgrim authored
The target shuffle code handles vector sources, but X86ISD::VBROADCAST can also accept a scalar source for splatting. Added as an extension to PR49658
-
Simon Pilgrim authored
-
David Green authored
This adds an extra pattern for inserting an f16 into a odd vector lane via an VINS. If the dual-insert-lane pattern does not happen to apply, this can help with some simple cases. Differential Revision: https://reviews.llvm.org/D95471
-
luxufan authored
The reason for generating mv a0, a0 instruction is when the stack object offset is large then int<12>. To deal this situation, in the elimintateFrameIndex function, it will create a virtual register, which needs the register scavenger to scavenge it. If the machine instruction that contains the stack object and the opcode is ADDI(the addi was generated by frameindexNode), and then this instruction's destination register was the same as the register that was generated by the register scavenger, then the mv a0, a0 was generated. So to eliminnate this instruction, in the eliminateFrameIndex function, if the instrution opcode is ADDI, then the virtual register can't be created. Differential Revision: https://reviews.llvm.org/D92479
-
Simon Pilgrim authored
The target shuffle code handles vector sources, but X86ISD::VBROADCAST can also accept a scalar source for splatting. Suggested by @craig.topper on PR49658
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Reuse the existing KnownBits multiplication code to handle what is effectively a ISD::UMUL_LOHI varient
-
Fangrui Song authored
With this change, for `#include <ar.h>`, `clang --target=aarch64-linux-gnu` will read `/usr/lib/gcc/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/include/ar.h` (on Debian gcc->gcc-cross) instead of `/usr/include/ar.h`. Some glibc headers (e.g. gnu/stubs.h) are different across architectures.
-
Fangrui Song authored
-
Fangrui Song authored
Seem unnecessary to diverge from GCC here. Beside, lib/../$OSLibDir can be considered closer to the GCC installation then the system root. The comment should not apply.
-
Fangrui Song authored
Removing the hack actually improves our compatibility with gcc -mx32.
-
Fangrui Song authored
If clang is installed in the system, the other -L suffice; otherwise $ccc_install_dir/../lib below suffices.
-
Fangrui Song authored
After path resolution, it duplicates a subsequent -L entry. The entry below (lib/gcc/$triple/$version/../../../../$OSLibDir) usually does not exist (e.g. Arch Linux; Debian cross gcc). When it exists, it typically just has ld.so (e.g. Debian native gcc) which cannot cause collision. Removing the -L (similar to reordering it) is therefore justified.
-
Craig Topper authored
[RISCV] Add test case to show a case where (mul (and X, 0xffffffff), (and Y, 0xffffffff)) optimization does not improve code. If the mul add two users, one of which was a sext.w, the mul would also be selected to a MULW before our pattern runs. This causes the ANDs to now be used by the already selected MULW and the mul we still need to select. They are unneeded on the MULW since MULW only reads the lower bits. So they get selected to SLLI+SRLI for the MULW use. The use for the (mul (and X, 0xffffffff), (and Y, 0xffffffff)) manages to reuse the SLLI. The end result is increased register pressure and no improvement to how soon we can start the MULW.
-