- Aug 30, 2012
-
-
Michael Liao authored
- Add 'UseSSEx' to force SSE legacy insn not being selected when AVX is enabled. As the penalty of inter-mixing SSE and AVX instructions, we need prevent SSE legacy insn from being generated except explicitly specified through some intrinsics. For patterns supported by both SSE and AVX, so far, we force AVX insn will be tried first relying on AddedComplexity or position in td file. It's error-prone and introduces bugs accidentally. 'UseSSEx' is disabled when AVX is turned on. For SSE insns inherited by AVX, we need this predicate to force VEX encoding or SSE legacy encoding only. For insns not inherited by AVX, we still use the previous predicates, i.e. 'HasSSEx'. So far, these insns fall into the following categories: * SSE insns with MMX operands * SSE insns with GPR/MEM operands only (xFENCE, PREFETCH, CLFLUSH, CRC, and etc.) * SSE4A insns. * MMX insns. * x87 insns added by SSE. 2 test cases are modified: - test/CodeGen/X86/fast-isel-x86-64.ll AVX code generation is different from SSE one. 'vcvtsi2sdq' cannot be selected by fast-isel due to complicated pattern and fast-isel fallback to materialize it from constant pool. - test/CodeGen/X86/widen_load-1.ll AVX code generation is different from SSE one after fixing SSE/AVX inter-mixing. Exec-domain fixing prefers 'vmovapd' instead of 'vmovaps'. llvm-svn: 162919
-
Craig Topper authored
llvm-svn: 162892
-
Michael Liao authored
- The root cause is that target constant materialization in X86 fast-isel creates a PC-rel addressing which may overflow 32-bit range in non-Small code model if .rodata section is allocated too far away from code segment in MCJIT, which uses Large code model so far. - Follow the similar logic to fix non-Small code model in fast-isel by skipping non-Small code model. llvm-svn: 162881
-
- Aug 29, 2012
-
-
Benjamin Kramer authored
llvm-svn: 162843
-
Craig Topper authored
llvm-svn: 162829
-
Chad Rosier authored
llvm-svn: 162807
-
Michael Liao authored
llvm-svn: 162805
-
- Aug 28, 2012
-
-
Michael Liao authored
llvm-svn: 162780
-
Bill Wendling authored
it here, then a 'register-memory' version would wrongly get the commutative flag. <rdar://problem/12180135> llvm-svn: 162741
-
Craig Topper authored
llvm-svn: 162740
-
Craig Topper authored
llvm-svn: 162738
-
Michael Liao authored
- Add a target-specific DAG optimization to recognize a pattern PTEST-able. Such a pattern is a OR'd tree with X86ISD::OR as the root node. When X86ISD::OR node has only its flag result being used as a boolean value and all its leaves are extracted from the same vector, it could be folded into an X86ISD::PTEST node. llvm-svn: 162735
-
Jakob Stoklund Olesen authored
llvm-svn: 162714
-
- Aug 27, 2012
-
-
Craig Topper authored
llvm-svn: 162661
-
Craig Topper authored
Don't allow vextractf128 to be folded with unaligned stores. We don't fold unaligned loads so shouldn't fold unaligned stores as it can cause an alignment fault to occur. llvm-svn: 162658
-
Craig Topper authored
Fold some patterns into instruction definitons so tablegen can infer flags removing the need for an explicit 'neverHasSideEffects = 1' llvm-svn: 162656
-
Craig Topper authored
Add HasAVX1Only predicate and use it for patterns that have an AVX1 instruction and an AVX2 instruction rather than relying on AddedComplexity. llvm-svn: 162654
-
- Aug 25, 2012
-
-
Richard Smith authored
Reviewed offline by chandlerc. llvm-svn: 162623
-
Jakob Stoklund Olesen authored
llvm-svn: 162622
-
- Aug 24, 2012
-
-
Jakob Stoklund Olesen authored
There is special magic happening when returning floating point values on the x87 stack. The RET instructions get extra f80 operands. llvm-svn: 162592
-
Jakob Stoklund Olesen authored
llvm-svn: 162556
-
Craig Topper authored
llvm-svn: 162534
-
Jakob Stoklund Olesen authored
They were inserted to silence TableGen's warning about redundant properties. That warning is now gone. llvm-svn: 162517
-
Jakob Stoklund Olesen authored
llvm-svn: 162514
-
Jakob Stoklund Olesen authored
No test case, this is a generalization of r160260. llvm-svn: 162485
-
- Aug 23, 2012
-
-
Craig Topper authored
llvm-svn: 162454
-
Craig Topper authored
llvm-svn: 162428
-
- Aug 22, 2012
-
-
Chad Rosier authored
Assertion failed: (Start.isValid() == End.isValid() && "Start and end should either both be valid or both be invalid!") when parsing inline asm. SMLoc assumes that the first char * in the source is invalid. However, when parsing an inline asm the mnemonic is at this location. I don't want to change SMLoc, so use a trivial workaround. llvm-svn: 162381
-
Craig Topper authored
Add a getName function to MachineFunction. Use it in places that previously did getFunction()->getName(). Remove includes of Function.h that are no longer needed. llvm-svn: 162347
-
Craig Topper authored
Don't cache the MBB in the class. Its only used by one function. Change a for loop over operands to use unsigned instead of int. llvm-svn: 162344
-
Craig Topper authored
llvm-svn: 162342
-
- Aug 21, 2012
-
-
Richard Smith authored
no cost to using memcpy here: the fixed code is optimized by LLVM to perfect machine code. llvm-svn: 162311
-
Chad Rosier authored
llvm-svn: 162306
-
Chad Rosier authored
this is the index of the operand that failed to match. Note: This may cause a buildbot failure due to an API mismatch in clang. Should recover with my next commit to clang. llvm-svn: 162295
-
Craig Topper authored
llvm-svn: 162270
-
Craig Topper authored
llvm-svn: 162267
-
Craig Topper authored
llvm-svn: 162264
-
Craig Topper authored
llvm-svn: 162263
-
Craig Topper authored
Replace a break with llvm_unreachable in the default case of a nested switch. Condense code a bit. No functional change. llvm-svn: 162261
-
Craig Topper authored
llvm-svn: 162260
-