| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | [InstCombine] Fix incongruous GEP type addrspace | Ewan Crawford | 2018-10-08 | 1 | -0/+23 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently running the @insertelem_after_gep function below through the InstCombine pass with opt produces invalid IR. Input: ``` define void @insertelem_after_gep(<16 x i32>* %t0) { %t1 = bitcast <16 x i32>* %t0 to [16 x i32]* %t2 = addrspacecast [16 x i32]* %t1 to [16 x i32] addrspace(3)* %t3 = getelementptr inbounds [16 x i32], [16 x i32] addrspace(3)* %t2, i64 0, i64 0 %t4 = insertelement <16 x i32 addrspace(3)*> undef, i32 addrspace(3)* %t3, i32 0 call void @extern_vec_pointers_func(<16 x i32 addrspace(3)*> %t4) ret void } ``` Output: ``` define void @insertelem_after_gep(<16 x i32>* %t0) { %t3 = getelementptr inbounds <16 x i32>, <16 x i32>* %t0, i64 0, i64 0 %t4 = insertelement <16 x i32 addrspace(3)*> undef, i32 addrspace(3)* %t3, i32 0 call void @my_extern_func(<16 x i32 addrspace(3)*> %t4) ret void } ``` Which although causes no complaints when produced, isn't valid IR as the insertelement use of the %t3 GEP expects an address space. ``` opt: /tmp/bad.ll:52:73: error: '%t3' defined with type 'i32*' but expected 'i32 addrspace(3)*' %t4 = insertelement <16 x i32 addrspace(3)*> undef, i32 addrspace(3)* %t3, i32 0 ``` I've fixed this by adding an addrspacecast after the GEP in the InstCombine pass, and including a check for this type mismatch to the verifier. Reviewers: spatel, lebedev.ri Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52294 llvm-svn: 343956 | ||||
| * | [InstCombine] peek through bitcasted vector/array pointer GEP operand | Sanjay Patel | 2018-04-18 | 1 | -0/+20 |
| | | | | | | | | | | | | | | | The bitcast may be interfering with other combines or vectorization as shown in PR16739: https://bugs.llvm.org/show_bug.cgi?id=16739 Most pointer-related optimizations are probably able to look through this bitcast, but removing the bitcast shrinks the IR, so it's at least a size savings. Differential Revision: https://reviews.llvm.org/D44833 llvm-svn: 330237 | ||||
| * | [InstSimplify] regenerate checks, move tests; NFC | Sanjay Patel | 2018-03-23 | 1 | -16/+0 |
| | | | | | llvm-svn: 328327 | ||||
| * | [InstCombine] regenerate test checks; NFC | Sanjay Patel | 2018-03-23 | 1 | -10/+17 |
| | | | | | llvm-svn: 328325 | ||||
| * | [ConstantFold] Support vector index when factoring out GEP index into ↵ | Haicheng Wu | 2017-12-04 | 1 | -3/+17 |
| | | | | | | | | | | | | preceding dimensions Follow-up of r316824. This patch supports the vector type for both current and previous index when factoring out the current one into the previous one. Differential Revision: https://reviews.llvm.org/D39556 llvm-svn: 319683 | ||||
| * | [ConstantFold] Fix a crash when folding a GEP that has vector index | Haicheng Wu | 2017-10-28 | 1 | -0/+9 |
| | | | | | | | | | | | LLVM crashes when factoring out an out-of-bound index into preceding dimension and the preceding dimension uses vector index. Simply bail out now when this case happens. Differential Revision: https://reviews.llvm.org/D38677 llvm-svn: 316824 | ||||
| * | [ConstantFold] Get the correct vector type when folding a getelementptr. | Davide Italiano | 2016-10-28 | 1 | -0/+15 |
| | | | | | | | Differential Revision: https://reviews.llvm.org/D26014 llvm-svn: 285371 | ||||
| * | Remove accidentally commited test. | Davide Italiano | 2016-10-27 | 1 | -15/+0 |
| | | | | | llvm-svn: 285366 | ||||
| * | [IR] Reintroduce getGEPReturnType(), it will be used in a later patch. | Davide Italiano | 2016-10-27 | 1 | -0/+15 |
| llvm-svn: 285365 | |||||

