From dc120f3962e14429e3c03e09735b1318bd3ed75f Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Wed, 9 May 2012 07:00:58 -0700 Subject: [PATCH] Fix regression in masked_store_blend for generic target. In ee1fe3aa9f, the LLVM_VERSION define was updated to never have the 'svn' suffix and the build was updated to handle LLVM 3.2. This file had a check for LLVM_3_1svn that was no longer hitting. This fixes some issues with unnecessary loads and stores in generated C++ code for the generic targets. --- builtins/target-generic-common.ll | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/builtins/target-generic-common.ll b/builtins/target-generic-common.ll index 6d4d2db6..50daf23e 100644 --- a/builtins/target-generic-common.ll +++ b/builtins/target-generic-common.ll @@ -249,7 +249,16 @@ declare void @__masked_store_32(* nocapture, , declare void @__masked_store_64(* nocapture, , %mask) nounwind -ifelse(LLVM_VERSION, `LLVM_3_1svn',` +ifelse(LLVM_VERSION, `LLVM_3_0', ` +declare void @__masked_store_blend_8(* nocapture, , + ) nounwind +declare void @__masked_store_blend_16(* nocapture, , + ) nounwind +declare void @__masked_store_blend_32(* nocapture, , + ) nounwind +declare void @__masked_store_blend_64(* nocapture, , + %mask) nounwind +', ` define void @__masked_store_blend_8(* nocapture, , ) nounwind alwaysinline { %v = load * %0 @@ -281,15 +290,6 @@ define void @__masked_store_blend_64(* nocapture, store %v1, * %0 ret void } -',` -declare void @__masked_store_blend_8(* nocapture, , - ) nounwind -declare void @__masked_store_blend_16(* nocapture, , - ) nounwind -declare void @__masked_store_blend_32(* nocapture, , - ) nounwind -declare void @__masked_store_blend_64(* nocapture, , - %mask) nounwind ') ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;